Example: Live Client Editor
Last Updated March 22, 2026
While Server-Side Rendering is recommended for static documentation, Client-Side Rendering is essential when dealing with user-generated content or building live preview interfaces.
Because Omni-Core is powered by Rust and compiled to WebAssembly (WASM), it can run directly inside the user’s browser at near-native speeds.
The Architecture
To parse MDX on the client, you must use the "use client" directive in Next.js. The parsing process is typically wrapped inside a useEffect hook to continuously generate the AST whenever the user’s input changes.
Implementation: Live Preview Editor
Here is how you can build a real-time split-pane editor. The user types raw Markdown on the left, and the WASM engine instantly renders the AST on the right.
This approach allows users to write complex documents containing mathematical formulas or custom dataset components, getting immediate visual feedback without ever hitting your server.