mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-26 22:20:19 +00:00
fix: webconfig should take &mut self
This commit is contained in:
parent
a239d2ba6a
commit
ae676d9d81
1 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ impl WebConfig {
|
||||||
/// work and suspended nodes.
|
/// work and suspended nodes.
|
||||||
///
|
///
|
||||||
/// Dioxus will load up all the elements with the `dio_el` data attribute into memory when the page is loaded.
|
/// Dioxus will load up all the elements with the `dio_el` data attribute into memory when the page is loaded.
|
||||||
pub fn hydrate(mut self, f: bool) -> Self {
|
pub fn hydrate(&mut self, f: bool) -> &mut Self {
|
||||||
self.hydrate = f;
|
self.hydrate = f;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ impl WebConfig {
|
||||||
/// Set the name of the element that Dioxus will use as the root.
|
/// 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.
|
/// This is akint to calling React.render() on the element with the specified name.
|
||||||
pub fn rootname(mut self, name: impl Into<String>) -> Self {
|
pub fn rootname(&mut self, name: impl Into<String>) -> &mut Self {
|
||||||
self.rootname = name.into();
|
self.rootname = name.into();
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ impl WebConfig {
|
||||||
/// Set the name of the element that Dioxus will use as the root.
|
/// 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.
|
/// This is akint to calling React.render() on the element with the specified name.
|
||||||
pub fn with_string_cache(mut self, cache: Vec<String>) -> Self {
|
pub fn with_string_cache(&mut self, cache: Vec<String>) -> &mut Self {
|
||||||
self.cached_strings = cache;
|
self.cached_strings = cache;
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue