0.1.1 • Published 11 months ago
react-live-runtime v0.1.1
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 pnpm@8.11.0
$ pnpm install --frozen-lockfile
$ npx husky install
$ chmod 755 .husky/pre-commit
$ pnpm run dev