Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including react-union with all npm packages installed. Try it out:

require("react/package.json"); // react is a peer dependency. require("react-dom/package.json"); // react-dom is a peer dependency. var reactUnion = require("react-union")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

react-union v0.12.1

Assemble a single React application from distributed HTML segments.

React Union

React Union is a library for rendering React applications in CMS-like environments. It allows you to treat your React applications as widgets, meaning that the user gets to choose the combination and location of widgets for any given page.

The main idea is that instead of rendering the application directly, we render HTML fragments which describe the widgets to render. We call them widget descriptors. React Union then parses the HTML output and renders the React application, which uses a single virtual DOM, making it trivial to reuse e.g. Redux state across widgets.

See https://react-union.org/union-component-introduction for more information.

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free