Feat: implememt nodes better
This commit is contained in:
1 parent
c9d95dd1dc
commit
edbb33b2ee
9 files changed
+317
-387
No files matched your search
@@ -1,6 +1,9 @@
|
||||
// mod hooks;
|
||||
// pub use hooks::use_context;
|
||||
|
||||
pub mod prelude {
|
||||
use dioxus_core::prelude::Context;
|
||||
pub fn use_state<T, G>(ctx: &mut Context<G>, init: impl Fn() -> T) -> (T, impl Fn(T)) {
|
||||
pub fn use_state<T, G>(ctx: &Context<G>, init: impl Fn() -> T) -> (T, impl Fn(T)) {
|
||||
let g = init();
|
||||
(g, |_| {})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user