API Reference
Explore runtime hooks, signals, template syntax, CLI flags, and configuration properties.
Creates a fine-grained reactive state signal. Accepts a primitive value, object, array, or dynamic accessor function.
let count = useState(0);
let double = useState(() => count * 2);
Executes side-effect logic whenever reactive dependencies inside the dependency array trigger mutations.
useEffect(() => {
console.log("Count changed:", count);
}, [count]);
Runs after component DOM mounting completes. Optionally return a cleanup function to execute on unmount.
onMount(() => {
const timer = setInterval(...);
return () => clearInterval(timer);
});
Client-side navigation component for zero-reload route switching without full browser reloads.
<Link to="/docs" class="nav-link">
Go to Docs
</Link>
Initializes a fresh Eronom project with pre-configured directory layout, standard routing, and HMR server.
$ eronom init docs
Launches the native Rust dev server with instant HMR compilation on http://localhost:4000.
$ eronom dev .