fix hot reloading
This commit is contained in:
1 parent
ed95ac932d
commit
7f0fa07757
3 files changed
+16
-3
No files matched your search
@@ -1,5 +1,3 @@
|
|||||||
use dioxus::prelude::*;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn rsx() {
|
fn rsx() {
|
||||||
let t = trybuild::TestCases::new();
|
let t = trybuild::TestCases::new();
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ use serde::{de::DeserializeOwned, Serialize};
|
|||||||
/// let state1 = use_state(cx, || from_server(|| {
|
/// let state1 = use_state(cx, || from_server(|| {
|
||||||
/// 1234
|
/// 1234
|
||||||
/// }));
|
/// }));
|
||||||
|
/// todo!()
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub fn server_cached<O: 'static + Serialize + DeserializeOwned>(server_fn: impl Fn() -> O) -> O {
|
pub fn server_cached<O: 'static + Serialize + DeserializeOwned>(server_fn: impl Fn() -> O) -> O {
|
||||||
|
|||||||
@@ -37,12 +37,26 @@ impl ToTokens for AttributeType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Clone, Debug, Hash)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct ElementAttrNamed {
|
pub struct ElementAttrNamed {
|
||||||
pub el_name: ElementName,
|
pub el_name: ElementName,
|
||||||
pub attr: ElementAttr,
|
pub attr: ElementAttr,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Hash for ElementAttrNamed {
|
||||||
|
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
||||||
|
self.attr.name.hash(state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl PartialEq for ElementAttrNamed {
|
||||||
|
fn eq(&self, other: &Self) -> bool {
|
||||||
|
self.attr == other.attr
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Eq for ElementAttrNamed {}
|
||||||
|
|
||||||
impl ElementAttrNamed {
|
impl ElementAttrNamed {
|
||||||
pub(crate) fn try_combine(&self, other: &Self) -> Option<Self> {
|
pub(crate) fn try_combine(&self, other: &Self) -> Option<Self> {
|
||||||
if self.el_name == other.el_name && self.attr.name == other.attr.name {
|
if self.el_name == other.el_name && self.attr.name == other.attr.name {
|
||||||
|
|||||||
Reference in new issue
Block a user