react-run 0.3.1

Run React code snippets/components from your command-line without config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function ProductList({ products }: { products: string[] }) {
  return products.map((p: string) => <li>{p}</li>);
}

export default function App() {
  const style: { [key: string]: string } = {
    background: "lightgray",
    padding: "1em",
  };

  return (
    <div style={style}>
      <h1>Our Products</h1>
      <ProductList products={["Apple", "Banana"]} />
    </div>
  );
}