| ▲ | slopinthebag an hour ago | |
I haven't used Iced but re. Dioxus, I don't know if it's necessary more verbose conceptually. One of the most frustrating things with React is handling async updates, and while Rust's async story is conceptually difficult, it's ultimately much easier to reason about (imo). Like are we sure a comparable component in React would be any less verbose?
Imo the RSX here is much less verbose than JSX. Inline match statement, inline if statement, inline for loop, .take(3) compared to `Array.from({ length: 3 }).map((_, i) => urls[i]))`, etc etc. This gives you automatic cancellation of the future, whereas with React you would need a third party library like React Query, and then manually abort requests in the asynchronous function with an abort signal -- in Rust, you get that for free. You also get data validation for free, instead of needing eg. Zod for manual runtime validation. | ||