An experimental drop-in replacement for ReactDOM, written in Rust, compiled to WebAssembly.
There are currently only plans to support renderToString
, which is already half-functional.
HTML markup should be generated (correctly), but no attributes will be rendered.
You can see a working SSR example right here.
npm install react-wasm-dom
Just replace renderToString
from ReactDOM with the equivalent provided function.
import { renderToString } from "react-dom/server";
// ....
const markup = renderToString(<App />);
becomes
import("react-wasm-dom/server").then(({ renderToString }) => {
// ....
const markup = renderToString(<App />);
});
- Only modern module bundlers are supported. Otherwise the library won't load successfully under Node
- Unit Tests
- HTML attribute rendering