Skip to content

πŸ•Ί Run React(JS/TS) snippets/components from your terminal without config

License

Notifications You must be signed in to change notification settings

UltiRequiem/react-run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

react-run

Run React code snippets without config πŸš€

Usage

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 🀯

Features

  • JSX/TSX

  • Functional or Class Components

  • Import External Libraries

  • Run via URL

Check the examples/ to see what is supported.

Installation

Cargo is the Rust package manager.

cargo install react-run

Or use a binary from releases.

Standing on the shoulders of giants

  • πŸ—Ό 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.

Roadmap

  • Integrate with SWC #4
  • Support TypeScript #2
  • Support running URLs #3
  • Live Reload #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 πŸ˜†

Consider supporting me on Patreon if you like my work πŸ™

Don't forget to start the repo ⭐

Versioning

We use Semantic Versioning. For the versions available, see the tags 🏷️

Authors

Eliaz Bobadilla - Creator and Maintainer πŸ’ͺ

See also the full list of contributors who participated in this project ✨

Licence

Licensed under the MIT License πŸ“„

About

πŸ•Ί Run React(JS/TS) snippets/components from your terminal without config

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project