Expand description
React Container Component
Provides a Dioxus component for mounting React applications using a
folder asset + manifest pattern. The build step generates metadata.json
describing the output files, and ReactApp reads it to load the correct
CSS/JS chunks — no manual renaming or copying needed.
§Breaking Changes (0.2.0)
- Removed
ReactContainer(single bundle.js only) ReactAppnow usesdir(folder asset) +manifest(ReactManifest) instead of individualbundle/stylesheetasset props
§Usage
ⓘ
const REACT_DIR: Asset = asset!("/assets/react");
// Parse metadata.json at compile time
let manifest = ReactManifest::from_json(
include_str!("../assets/react/metadata.json")
).expect("invalid metadata.json");
rsx! {
ReactApp {
dir: REACT_DIR,
manifest: manifest,
bridge: bridge,
}
}Re-exports§
pub use ReactApp_completions::Component::ReactApp;
Structs§
- React
AppProps - Properties for the
ReactAppcomponent. - React
Manifest - Build manifest describing the React app’s output files.
Functions§
- React
App - React application container — loads a React app from a folder asset + manifest.