wip: some project refactor
This commit is contained in:
1 parent
feab50f24a
commit
8cfc437bfe
27 files changed
+430
-677
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
@@ -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!()
|
||||
|
||||
Reference in new issue
Block a user