alternative.rs 547 B

1234567891011121314151617181920212223
  1. use dioxus_core::prelude::*;
  2. fn main() {}
  3. pub static Example: FC<()> = |cx| {
  4. let list = (0..10).map(|f| LazyNodes::new(move |f| todo!()));
  5. cx.render(LazyNodes::new(move |cx| {
  6. let bump = cx.bump();
  7. cx.raw_element(
  8. "div",
  9. None,
  10. &mut [],
  11. &mut [],
  12. cx.bump().alloc([
  13. cx.text(format_args!("hello")),
  14. cx.text(format_args!("hello")),
  15. cx.fragment_from_iter(list),
  16. ]),
  17. None,
  18. )
  19. }))
  20. };