It's essentially just splitting the thought process down the middle. Our user story might say, "when I click the X button, then the dialog closes". Thus, we start thinking about the implementation in those terms as well. But instead, break it up into:
"when I click the X button, it sets the opened state to false", then without any care for how the state got there, "when state.opened is true, display the dialog".
Once you not only make that transition, but start to do it reflexively, it'll really have you reevaluating how you think about software in general. ALL software is really just a state machine.
A database is a "store", with memoizing SELECTors (pun intended), and INSERT is just an action with type: 'table_name/insert', payload: values.
REST APIs have essentially the same CRUD operations as databases.
At its core, React is just an abstraction around the subscriber model that notifies your components when a value changes. Other subscriber models include Promises, AWS lambda functions, and file watchers. ;-)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's essentially just splitting the thought process down the middle. Our user story might say, "when I click the X button, then the dialog closes". Thus, we start thinking about the implementation in those terms as well. But instead, break it up into:
"when I click the X button, it sets the
opened
state tofalse
", then without any care for how the state got there, "whenstate.opened
is true, display the dialog".Once you not only make that transition, but start to do it reflexively, it'll really have you reevaluating how you think about software in general. ALL software is really just a state machine.
A database is a "store", with memoizing
SELECT
ors (pun intended), andINSERT
is just an action withtype: 'table_name/insert', payload: values
.REST APIs have essentially the same CRUD operations as databases.
At its core, React is just an abstraction around the subscriber model that notifies your components when a value changes. Other subscriber models include Promises, AWS lambda functions, and file watchers. ;-)