Skip to content

Commit 22dd1e4

Browse files
committed
[readme]
1 parent 0e91b1f commit 22dd1e4

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,18 @@ export class MyNode extends Node {
7272
}
7373

7474
editor.use(ReactRenderPlugin, {
75-
component: MyNode
75+
component: MyNode // common custom React component
7676
}
77-
```
77+
```
78+
79+
Component specific custom node:
80+
```js
81+
class AddComponent extends Rete.Component {
82+
constructor() {
83+
super("Add");
84+
this.data.component = MyNode;
85+
}
86+
...
87+
```
88+
89+
[Example](https://codesandbox.io/s/retejs-react-render-t899c)

0 commit comments

Comments
 (0)