Run React code snippets without config π
The entry point is always a component called App
π
// example.tsx
function ProductList({ products }: { products: string[] }) {
return products.map((p) => <li>{p}</li>);
}
export default function App() {
const style = {
background: "lightgray",
padding: "1em",
};
return (
<div style={style}>
<h1>Our Products</h1>
<ProductList products={["Apple", "Banana"]} />
</div>
);
}
Run it π
react-run example.tsx
Or run a hosted file π€
react-run https://raw.githubusercontent.com/UltiRequiem/react-run/main/examples/typescript.tsx
This will open your default browser with your component loaded π€―
-
JSX/TSX
-
Functional or Class Components
-
Import External Libraries
-
Run via URL
Check the examples/ to see what is supported.
Cargo is the Rust package manager.
cargo install react-run
Or use a binary from releases.
-
πΌ tokio-rs: A runtime for writing reliable asynchronous applications with Rust.
-
π€ colored: The easier way to have text on your term!
-
π clap: A full featured, fast Command Line Argument Parser for Rust
-
β‘ minireq: Simple, minimal-dependency HTTP client.
-
ποΈ swc: SWC is 20x faster than Babel on a single thread and 70x faster on four cores.
Open an Issue, I will check it a soon as possible π
If you want to hurry me up a bit send me a tweet π
Consider supporting me on Patreon if you like my work π
Don't forget to start the repo β
We use Semantic Versioning. For the versions available, see the tags π·οΈ
Eliaz Bobadilla - Creator and Maintainer πͺ
See also the full list of contributors who participated in this project β¨
Licensed under the MIT License π