https://github.com/seamapi/react-repl
React component for creating a REPL or interactive command line interface
https://github.com/seamapi/react-repl
react react-component repl
Last synced: 5 months ago
JSON representation
React component for creating a REPL or interactive command line interface
- Host: GitHub
- URL: https://github.com/seamapi/react-repl
- Owner: seamapi
- License: mit
- Created: 2021-02-05T08:15:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-10T00:45:26.000Z (7 months ago)
- Last Synced: 2025-01-28T03:13:08.091Z (5 months ago)
- Topics: react, react-component, repl
- Language: JavaScript
- Homepage: https://seamapi.github.io/react-repl/?path=/story/reactrepljs--main
- Size: 2.61 MB
- Stars: 23
- Watchers: 3
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# (Awesome) React Repl
Display or interact with a REPL (Read Eval Print Loop). Create an interactive terminal for Python,
Javascript or whatever in React.[Try it out](https://seamapi.github.io/react-repl/?path=/story/reactrepljs--main)

## Usage
`npm install awesome-react-repl`
### Javascript REPL
```javascript
import { ReactReplJS } from "awesome-react-repl"const JavascriptRepl = () => {
return (
)
}
```### General-Purpose REPL UI
```javascript
import { ReactReplView } from "awesome-react-repl"const GeneralPurposeReplUI = () => {
return (
)
}
```## Advanced Javascript REPL Usage
```javascript
import { useReactReplJS } from "awesome-react-repl"const JavascriptRepl = () => {
const { submitCode, ReactRepl } = useReactReplJS()
return (
submitCode('alert(`Button pressed! a=${a}! This will appear in the REPL!`)')}>Alert!
)
}
```## Development
1. Run `yarn install`
2. Run `yarn storybook`