React
Render any block your own way with React components, shipped with your site
Built by
Availability
Works with
- Curvenote CLI
- Curvenote Reader
- Curvenote Sites
Categories
Resources
What Curvenote can do with a React integration
Override a block
Restyle every block of a kind, such as admonitions or tables.
Add your own
Pair a custom directive with a component that draws it.
JSX or plain ESM
Write TSX the CLI bundles, or zero-build modules.
Built-ins underneath
Wrap the built-in renderers rather than replace them.
How it works with Curvenote
A site can ship its own render plugins: small React components that draw a kind of block. Override how an existing block looks (every admonition, say), or pair a new directive with a component of your own, such as a table readers can filter.
Write them as plain ESM with createElement, or as JSX and TSX that the Curvenote CLI bundles for you. The site provides React itself, so plugins stay small.
Setting it up
List your plugin under project.plugins in curvenote.yml.
Export your directives and, under renderers, the modules that draw them.
Run curvenote start to see them, then deploy.
Questions
Do I bundle React with my plugin?
No: the site injects one React for every plugin. If you bundle yourself, mark react and react-dom as external.
About React
React is the JavaScript library for building user interfaces, and what Curvenote sites are built with.
More integrations
AltairInteractive Altair and Vega-Lite charts from notebooksVisualizationComputational Tools
BinderHubRun an article’s code in a reproducible environment, from the pageNotebooksComputational Tools