1
0

async.rs 339 B

123456789101112131415161718192021
  1. use std::pin::Pin;
  2. use dioxus_core::prelude::*;
  3. use futures::Future;
  4. fn main() {}
  5. const App: FC<()> = |cx| {
  6. let mut fut = cx.use_hook(
  7. || {
  8. //
  9. Box::pin(async { loop {} }) as Pin<Box<dyn Future<Output = ()>>>
  10. },
  11. |f| f,
  12. |_| {},
  13. );
  14. cx.submit_task(fut);
  15. todo!()
  16. };