2023-06-01 16:48:11 +02:00
---
title: Snippet.asRenderProps()
---
The `Snippet.asRenderProps()` method will return the data stored in the
2024-01-21 11:16:40 -08:00
snippet as a serializable JavaScript object. This method is typically
2023-06-01 16:48:11 +02:00
not invoked directly but rather called under the hood as a result of
calling [`Pattern.getRenderProps()` ](/reference/core/pattern/getrenderprops ).
## Signature
```js
Object snippet.asRenderProps()
```
## Returned object properties
2024-01-21 11:16:40 -08:00
This returns JavaScript object has the following properties:
2023-06-01 16:48:11 +02:00
| Name | Description |
| ----:| ----------- |
2023-11-12 11:13:38 +01:00
| `attributes` | The result of [Path.attributes.asRenderProps() ](/reference/api/attributes/asrenderprops ) |
2023-06-01 16:48:11 +02:00
| `def` | The ID of the snippet's reference in the `defs` section of the SVG (the snippet code) |
| `anchor` | The [Point ](/reference/api/point ) on which the snippet is anchored, or rather its [`Point.asRenderProps()` ](/reference/api/point/asrenderprops ) result |