Feat: add css example
This commit is contained in:
1 parent
7a4594e237
commit
edf09c1892
5 files changed
+57
-40
No files matched your search
@@ -52,7 +52,7 @@ impl<'a> Context<'a> {
|
||||
fn use_context<'b, I, O: 'b>(&self, f: fn(&'b I) -> O) -> ContextGuard2<O> {
|
||||
todo!()
|
||||
}
|
||||
fn add_listener(&self, f: impl Fn(()) + 'static) {
|
||||
fn add_listener(&self, f: impl Fn(()) + 'a) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
@@ -78,6 +78,8 @@ fn t<'a>(ctx: Context<'a>) {
|
||||
ctx.add_listener(move |_| {
|
||||
// let val = value.get().as_str();
|
||||
let val2 = r2.as_bytes();
|
||||
println!("v2 is {}", r2);
|
||||
// println!("refed is {}", refed);
|
||||
});
|
||||
|
||||
// let refed = value.deref();
|
||||
|
||||
@@ -80,7 +80,7 @@ impl<'a> Context<'a> {
|
||||
DomTree {}
|
||||
}
|
||||
|
||||
pub fn callback(&self, f: impl Fn(()) + 'static) {}
|
||||
pub fn callback(&self, f: impl Fn(()) + 'a) {}
|
||||
|
||||
/// Create a suspended component from a future.
|
||||
///
|
||||
@@ -188,7 +188,7 @@ mod context_api {
|
||||
//!
|
||||
use super::*;
|
||||
|
||||
use std::{marker::PhantomPinned, ops::Deref};
|
||||
use std::{marker::PhantomPinned, mem::swap, ops::Deref};
|
||||
|
||||
pub struct RemoteState<T> {
|
||||
inner: *const T,
|
||||
|
||||
Reference in new issue
Block a user