fragment_from_iter.rs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. use dioxus_core::prelude::*;
  2. fn main() {}
  3. fn app<'a>(cx: Context<'a>, props: &()) -> Element<'a> {
  4. let vak = use_suspense(
  5. cx,
  6. || async {},
  7. |c, _res| c.render(LazyNodes::new(move |f| f.text(format_args!("")))),
  8. );
  9. let d1 = cx.render(LazyNodes::new(move |f| {
  10. f.raw_element(
  11. "div",
  12. None,
  13. [],
  14. [],
  15. [
  16. f.fragment_from_iter(vak),
  17. f.text(format_args!("")),
  18. f.text(format_args!("")),
  19. f.text(format_args!("")),
  20. f.text(format_args!("")),
  21. ],
  22. None,
  23. )
  24. }));
  25. Some(LazyNodes::new(move |f| {
  26. f.raw_element(
  27. "div",
  28. None,
  29. [],
  30. [],
  31. [
  32. f.text(format_args!("")),
  33. f.text(format_args!("")),
  34. f.text(format_args!("")),
  35. f.text(format_args!("")),
  36. d1.unwrap(),
  37. ],
  38. None,
  39. )
  40. }))
  41. }