Struct dioxus_web::Config

source ·
pub struct Config { /* private fields */ }
Expand description

Configuration for the WebSys renderer for the Dioxus VirtualDOM.

This struct helps configure the specifics of hydration and render destination for WebSys.

Example

dioxus_web::launch(App, Config::new().hydrate(true).root_name("myroot"))

Implementations§

Create a new Default instance of the Config.

This is no different than calling Config::default()

Enable SSR hydration

This enables Dioxus to pick up work from a pre-renderd HTML file. Hydration will completely skip over any async work and suspended nodes.

Dioxus will load up all the elements with the dio_el data attribute into memory when the page is loaded.

Set the name of the element that Dioxus will use as the root.

This is akint to calling React.render() on the element with the specified name.

Set the name of the element that Dioxus will use as the root.

This is akint to calling React.render() on the element with the specified name.

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.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.