jim
10/09/2019, 3:50 PMlist.map { it.map { ... }}
or you need to create a mutable list with nested for
loops that mutate the list. Those approaches are both perfectly doable, but not super ergonomic. The Compose method ends up handling if
statements and for
loops in a more natural way.
To be clear, other declarative frameworks like React, Flutter, Vue, and Ember are great frameworks, so please don't take the above as a criticism of them. The various frameworks have different constraints and environments, and these decisions are all just a series of tradeoffs. We as an ecosystem are still learning and experimenting and iterating. We opted to do more work at compile time instead of at runtime with a VDOM, which has both pros and cons. Hopefully we will find that the pros outweigh the cons in our environment, but only time will tell.alexsullivan114
10/09/2019, 4:01 PMcreateAppContainer
method in react-navigation
or the connected component in react-redux), but I've chalked that up to still being relatively new at using React.
For the control flow, my knee-jerk (possibly naive) take is that the VDOM approach encourages a more "functional" (I don't like using the term functional since it's so damned overloaded but I don't know what else to use here) approach, whereas the composing method is more tailored around a traditional imperative style of dealing with control flow (I recognize the limits of that statement since Compose is fundamentally built around composable functions). Would you agree with that assessment?
What an exciting programming time we live in. It's so fun to watch as the library (and the broader ecosystem) progresses.jim
10/09/2019, 7:28 PM