0.15.1 • Published 11 months ago
@coldwired/react v0.15.1
@coldwired/react 
Why?
Usage
Setup
You need to create a react root and a plugin that you will register with your Actions
instance.
import { Actions } from '@coldwired/actions';
import { createRoot, createReactPlugin } from '@coldwired/react';
const root = createRoot(document.getElementById('react-root'), {
loader: (name) => import(`./${name}.js`).default,
});
const plugin = createReactPlugin({ root });
const actions = new Actions({ element: document.body, plugins: [plugin] });
actions.observe();
await actions.ready();