@zhangmo8/repl-react
TypeScript icon, indicating that this package has built-in type declarations

0.0.8-beta.1 • Public • Published

repl-react

NPM dev or peer Dependency Version

A online playground for react, inspired by vue/repl and unocss/playground.

Thanks to the open source of vue/repl and its maintainers, this project is built to provide a similar experience for react.

@zhangmo8/repl-react

React REPL as a React component.

Environment Support

vite v6.0.0+

Make sure your vite version is above 6. If not, there may be wasm errors in the local environment. However, it does not affect the effect after packaging. For details, you can check here.

Basic Usage

import { Repl, useReplStore } from '@zhangmo8/repl-react'

const Demo = () => {
  const { state, setState } = useReplStore()
  return (
    <div>
      <Repl />
      <p>Code: {state.code}</p>
    </div>
  )
}

Readme

Keywords

none

Package Sidebar

Install

npm i @zhangmo8/repl-react

Weekly Downloads

3

Version

0.0.8-beta.1

License

MIT

Unpacked Size

57.9 MB

Total Files

10

Last publish

Collaborators

  • wegi8