examples
examples copied to clipboard
Add React Dataflow example using dynamic import
A user asked Cobus if you could embed a notebook in React such that it fetches the latest published version of the notebook at runtime, instead of installing and checking in and bundling and having to redeploy if you make changes.
This also sidesteps the file attachment bundler issues! Wondering if it should be the default technique we recommend in the Embed modal.
behavior is identical to https://observablehq.github.io/examples/react-dataflow/
(oops gotta update the styles in my new one)
oh i could also strip out the create-react-app junk and use rollup or…
Wondering if it should be the default technique we recommend in the Embed modal.
How about we call the existing method "Runtime with React (downloaded)" and add another type called "Runtime with React (dynamic)"?
(gotta switch to some other work, will come back to this maybe tonight & rip out create-react-app so it's not 12k lines of package-lock lol)
Previous create-react-app version of the PR: +11,923 lines of code
Now just adapting the rollup config from react-dataflow example: +1,039 lines of code 😅