wip: some project refactor

This commit is contained in:
Jonathan Kelley committed 2021-07-09 11:54:07 -04:00
1 parent feab50f24a
commit 8cfc437bfe
27 files changed
+430 -677

No files matched your search

+4 -3
View File
@@ -6,16 +6,17 @@ use futures::Future;
fn main() {}
const App: FC<()> = |cx| {
// create a new future
let mut fut = cx.use_hook(
|| {
//
Box::pin(async { loop {} }) as Pin<Box<dyn Future<Output = ()>>>
async { loop {} }
// Box::pin(async { loop {} }) as Pin<Box<dyn Future<Output = ()>>>
},
|f| f,
|_| {},
);
cx.submit_task(fut);
// let g = unsafe { Pin::new_unchecked(fut) };
cx.submit_task(fut);
+1 -1
View File
@@ -20,7 +20,7 @@ struct ListItem {
}
fn app(cx: Context<AppProps>) -> VNode {
let (val, set_val) = use_state_classic(cx, || 0);
// let (val, set_val) = use_state_classic(cx, || 0);
cx.render(LazyNodes::new(move |_nodecx| {
todo!()