Slate will render custom nodes for [`Block`](../slate/block.md) and [`Inline`](../slate/inline.md) models, based on what you pass in as your schema. This allows you to completely customize the rendering behavior of your Slate editor.
A dictionary of DOM attributes that you must attach to the main DOM element of the node you render. For example:
```js
return (
<p{...props.attributes}>{props.children}</p>
)
```
```js
return (
<figure{...props.attributes}>
<imgsrc={...}/>
</figure>
)
```
### `children`
`Object`
A set of React children elements that are composed of internal Slate components that handle all of the editing logic of the editor for you. You must render these as the children of your non-void nodes. For example:
```js
return (
<p{...props.attributes}>
{props.children}
</p>
)
```
### `editor`
`Editor`
A reference to the Slate [`<Editor>`](./editor.md) instance. This allows you to retrieve the current `state` of the editor, or perform a `change` on the state. For example:
```js
const state = editor.getState()
```
```js
editor.change((change) => {
change.selectAll().delete()
})
```
### `isSelected`
`Boolean`
A boolean representing whether the node you are rendering is currently selected. You can use this to render a visual representation of the selection.
By default, Slate implements a `shouldComponentUpdate` preventing useless re-renders for node components. While the default implementation covers most use cases, you can customize the logic to fit your needs. For example: