SSR migrated to Rust
This commit is contained in:
8
cores/mizan-rust-ssr/tests/fixture/entry.js
Normal file
8
cores/mizan-rust-ssr/tests/fixture/entry.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import { renderToStaticMarkup } from "react-dom/server.browser"
|
||||
import { createElement } from "react"
|
||||
import { Hello } from "./Hello.js"
|
||||
|
||||
// The bundle exposes one global the embedded engine calls. No module system at
|
||||
// runtime — the engine receives a bare script that defines `renderApp`. This is
|
||||
// the production shape in miniature: build-time bundle, runtime eval.
|
||||
globalThis.renderApp = (props) => renderToStaticMarkup(createElement(Hello, props))
|
||||
Reference in New Issue
Block a user