One big advantage of React over templating languages is ability to use regular JS functions for loops and conditions. What would happen if regular `map` is used instead of `e/for` in this example: https://electric.hyperfiddle.net/user.demo-chat!Chat ?
clojure.core/map is not incremental so you’d lose the performance benefit of reactivity at that call. Note React is not fine grain reactive and will over-compute loops; electric does not have that problem. also, e/for is just reactive map, we chose the for-comprehension syntax over lambda syntax because it lays out your UI code properly without making you feel like you’re programming with collections but it’s just sugar over incremental map. We could have shadowed clojure.core/map with reactive map, which would imply similarly shadowing clojure lambda with electric lambda, but we also highly value clojure/script interoperability, so anything we change in a way that isn’t 99% backwards compatible needs to get a new name. ergo, e/for. also note it’s really e/for-by (and e/map-by) because, like React, you need an extra “react key” parameter (they put it in a different place but the net effect is the same).