Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ultirequiem/react-run
🕺 Run React(JS/TS) snippets/components from your terminal without config
https://github.com/ultirequiem/react-run
esm react rust swc typescript
Last synced: 11 days ago
JSON representation
🕺 Run React(JS/TS) snippets/components from your terminal without config
- Host: GitHub
- URL: https://github.com/ultirequiem/react-run
- Owner: UltiRequiem
- License: mit
- Created: 2022-01-23T22:44:04.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-02T21:32:36.000Z (about 1 year ago)
- Last Synced: 2024-10-30T09:35:59.188Z (21 days ago)
- Topics: esm, react, rust, swc, typescript
- Language: Rust
- Homepage:
- Size: 135 KB
- Stars: 14
- Watchers: 2
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# react-run
Run React code snippets without config 🚀
## Usage
The entry point is always a component called `App` 👇
```tsx
// example.tsxfunction ProductList({ products }: { products: string[] }) {
return products.map((p) =>
}
export default function App() {
const style = {
background: "lightgray",
padding: "1em",
};
return (
Our Products
);
}
```
Run it 🏃
```sh
react-run example.tsx
```
Or run a hosted file 🤖
```sh
react-run https://raw.githubusercontent.com/UltiRequiem/react-run/main/examples/typescript.tsx
```
> This will open your default browser with your component loaded 🤯
## Features
- JSX/TSX
- Functional or Class Components
- Import External Libraries
- Run via URL
Check the [examples/](./examples) to see what is supported.
## Installation
> [Cargo](https://doc.rust-lang.org/cargo) is the Rust package manager.
```sh
cargo install react-run
```
Or use a binary from
[releases](https://github.com/UltiRequiem/react-run/releases/latest).
## Standing on the shoulders of giants
- 🗼 [tokio-rs](https://github.com/tokio-rs/tokio): A runtime for writing
reliable asynchronous applications with Rust.
- 🤗 [colored](https://github.com/mackwic/colored): The easier way to have text
on your term!
- 👏 [clap](https://github.com/clap-rs/clap): A full featured, fast Command Line
Argument Parser for Rust
- ⚡ [minireq](https://github.com/neonmoe/minreq): Simple, minimal-dependency
HTTP client.
- 🏎️ [swc](https://swc.rs): SWC is 20x faster than Babel on a single thread and
70x faster on four cores.
## Roadmap
- [x] Integrate with SWC [#4](https://github.com/UltiRequiem/react-run/issues/4)
- [x] Support TypeScript [#2](https://github.com/UltiRequiem/react-run/issues/2)
- [x] Support running URLs
[#3](https://github.com/UltiRequiem/react-run/issues/3)
- [ ] Live Reload [#1](https://github.com/UltiRequiem/react-run/issues/1)
## Support
Open an Issue, I will check it a soon as possible 👀
If you want to hurry me up a bit
[send me a tweet](https://twitter.com/UltiRequiem) 😆
Consider [supporting me on Patreon](https://patreon.com/UltiRequiem) if you like
my work 🙏
Don't forget to start the repo ⭐
## Versioning
We use [Semantic Versioning](http://semver.org). For the versions available, see
the [tags](https://github.com/UltiRequiem/react-run/tags) 🏷️
## Authors
[Eliaz Bobadilla](https://ultirequiem.com) - Creator and Maintainer 💪
See also the full list of
[contributors](https://github.com/UltiRequiem/react-run/contributors) who
participated in this project ✨
## Licence
Licensed under the MIT License 📄