Re:Why Elm? [pdf]
by hathawsh on Monday May 08, 2017 @04:10PM
(#14295133)
Would it be possible for Elm to evolve a way to let components keep internal state? The lack of component-local state is what ultimately drove me away from Elm for my last project. It seems like it should be possible, since Elm and Redux are vaguely similar and Redux can store component-local state if you need it to.
[ Parent
| on HN ]
I don't see this happening.
local state would invalidate many things in the Elm ecosystem like the time travel debugger, all the tutorials, etc. It's not such an easy problem, you have to write a new reconciler that only renders the things that have changed instead of always rendering the entire tree.
btw, redux only deal with global state but encourages the use of local (setState based) state whenever it makes sense.