react-live-runtime
v0.1.1
Published
<p> <a href="https://github.com/WindrunnerMax/ReactLive">GitHub</a> <span>|</span> <a href="https://windrunnermax.github.io/ReactLive/">Playground</a> <span>|</span> <a href="https://windrunnermax.github.io/DocEditor/">DEMO</a> <span>|</span> <a hr
Downloads
87
Readme
React Live
Usage
$ pnpm add react-live-runtime -E
// ./example/index.tsx
const sandbox = withSandbox({ React, console, alert, ...Arco });
const compiledCode = compileWithSucrase("<div>" + code + "</div>");
const Component = renderWithDependency(compiledCode, sandbox) as JSX.Element;
ReactDOM.render(Component, el);
Develop
$ npm i -g [email protected]
$ pnpm install --frozen-lockfile
$ npx husky install
$ chmod 755 .husky/pre-commit
$ pnpm run dev