An open API service indexing awesome lists of open source software.

https://github.com/windrunnermax/reactlive

Real-time preview of React components
https://github.com/windrunnermax/reactlive

Last synced: about 1 year ago
JSON representation

Real-time preview of React components

Awesome Lists containing this project

README

          

# React Live


GitHub

Playground

DEMO

BLOG

## Usage

```bash
$ pnpm add react-live-runtime -E
```

```js
// ./example/index.tsx
const sandbox = withSandbox({ React, console, alert, ...Arco });
const compiledCode = compileWithSucrase("

" + code + "
");
const Component = renderWithDependency(compiledCode, sandbox) as JSX.Element;
ReactDOM.render(Component, el);
```

## Develop

```bash
$ npm i -g pnpm@8.11.0
$ pnpm install --frozen-lockfile
$ npx husky install
$ chmod 755 .husky/pre-commit
$ pnpm run dev
```