Struct dioxus_web::Config
source · pub struct Config { /* private fields */ }Expand description
Implementations§
source§impl Config
impl Config
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new Default instance of the Config.
This is no different than calling Config::default()
sourcepub fn rootname(self, name: impl Into<String>) -> Self
pub fn rootname(self, name: impl Into<String>) -> Self
Set the name of the element that Dioxus will use as the root.
This is akin to calling React.render() on the element with the specified name.
sourcepub fn with_string_cache(self, cache: Vec<String>) -> Self
pub fn with_string_cache(self, cache: Vec<String>) -> Self
Sets a string cache for wasm bindgen to intern. This can help reduce the time it takes for wasm bindgen to pass strings from rust to javascript. This can significantly improve pefromance when passing strings to javascript, but can have a negative impact on startup time.
Currently this cache is only used when creating static elements and attributes.
sourcepub fn with_default_panic_hook(self, f: bool) -> Self
pub fn with_default_panic_hook(self, f: bool) -> Self
Set whether or not Dioxus should use the built-in panic hook or defer to your own.
The panic hook is set to true normally so even the simplest apps have helpful error messages.