14 ms·
Don't know, I never liked two-way bindings :) <MuseumTech>Adobe Flex added those at some point but it was a complete downgrade from the simpler one way bindings
by boubiyeah 11y ago
Don't know, I never liked two-way bindings :) <MuseumTech>Adobe Flex added those at some point but it was a complete downgrade from the simpler one way bindings + events.</MuseumTech>
A central state atom has pros (debug tooling and the fabled undo for free being the main ones?) and cons. The cons affects me more than the pros. Clojure's Om and React+redux maintain a central atom but still allow for local state in a pinch.
I appreciate your comment but I wish it was a bit more constructive; Why do you think a central state atom is so much better ? How can one write ready-to-use smart components with central state ? (e.g ReactTransitionGroup)
- rtfeldman 11y agoHere's a long-form answer to both questions. :) https://www.safaribooksonline.com/blog/2015/10/29/react-local-component-state/ https://www.safaribooksonline.com/blog/2015/10/29/react-loca...
- boubiyeah 11y agoFine article... But all that it tells me from my experience is that it's a good thing to put 80-90% of the app state in a central atom :p A good practice or rule of thumb is just that, it shouldn't always be the only way to do things.
- rtfeldman 11y agoFlexibility is a fine rule of thumb, but opening the door in those 10% of cases costs you things like time travel. Quite a price tag! :)