Something went wrong. Try again.
A monorepo of young ideas
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132import { useState } from "react";
export function App({ name, initialCount }) { const [count, setCount] = useState(initialCount);
return ( <main style={{ fontFamily: "system-ui, sans-serif", maxWidth: 600, margin: "4rem auto", }} > <h1>Hello, {name}!</h1> <p> This markup was rendered by React running inside QuickJS, embedded in a Rust server. If the button below works, the client bundle hydrated successfully. </p> <button onClick={() => setCount(c => c + 1)}> Clicked {count} {count === 1 ? "time" : "times"} </button> <p> <small> Try <a href="/?name=Rustacean">/?name=Rustacean</a> to change the props. </small> </p> </main> );}