3 ms·
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
by hathawsh 9y ago
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.
- boubiyeah 9y agoI 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.