Re:Boiling React Down to Few Lines in JQuery
by donw on Sunday March 08, 2015 @09:58PM
(#9168509)
It seems to work reasonably well for the two non-toy apps I've worked on that use a single state object. There are two key rules required to make this work, however:
1. For each domain, state can be modified in one place (in React, a store).
2. For each domain, state can be read in once place (a Presenter).
This preserves data-hiding for the most part, and keeps you from having to play hunt-the-wumpus when you need to change the data structure.
1. For each domain, state can be modified in one place (in React, a store).
2. For each domain, state can be read in once place (a Presenter).
This preserves data-hiding for the most part, and keeps you from having to play hunt-the-wumpus when you need to change the data structure.