Feat: overall API updates

This commit is contained in:
Jonathan Kelley committed 2021-02-12 00:29:46 -05:00
1 parent 125f5426a4
commit f47651b32a
16 files changed
+234 -177

No files matched your search

+7 -7
View File
@@ -1,10 +1,10 @@
// mod hooks;
// pub use hooks::use_context;
pub mod prelude {
use dioxus_core::prelude::Context;
pub fn use_state<T, G>(ctx: &Context<G>, init: impl Fn() -> T) -> (T, impl Fn(T)) {
let g = init();
(g, |_| {})
}
}
// pub mod prelude {
// use dioxus_core::prelude::Context;
// pub fn use_state<T, G>(ctx: &Context<G>, init: impl Fn() -> T) -> (T, impl Fn(T)) {
// let g = init();
// (g, |_| {})
// }
// }