You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Or even completely remove the paragraph and directly render the inner children:
616
619
return children;
617
620
}
618
-
}
619
-
)
620
-
621
-
621
+
},
622
+
),
622
623
]}
623
624
/>;
624
625
```
@@ -636,3 +637,22 @@ Note: if you override the rules for `inline_item`, `item_link` or `block` nodes,
636
637
| metaTransformer |`({ node, meta }) => Object \| null`|:x:| Transform `link` and `itemLink` meta property into HTML props |[See function](https://github.com/datocms/structured-text/blob/main/packages/generic-html-renderer/src/index.ts#L61)|
637
638
| customRules |`Array<RenderRule>`|:x:| Customize how document is converted in JSX (use `renderRule()` to generate) |`null`|
638
639
| renderText |`(text: string, key: string) => ReactElement \| string \| null`|:x:| Convert a simple string text into React |`(text) => text`|
640
+
641
+
## Development
642
+
643
+
This repository contains a number of demos/examples. You can use them to locally test your changes to the package with `npm link`:
644
+
645
+
```
646
+
npm link
647
+
cd examples/images-and-seo/vanilla-react
648
+
npm link react-datocms
649
+
npm run start
650
+
```
651
+
652
+
Now on another terminal you can run:
653
+
654
+
```
655
+
npm run watch
656
+
```
657
+
658
+
This will re-compile the package everytime you make a change, and the example project will pick those changes instantly.
0 commit comments