Some thoughts and reflections from teaching this at EDA:
We used to teach this pathway: React in es6, components with state -> learn jsx -> learn redux -> rip out component state.
A lot of people found this confusing. @mixmix had the idea to flip it around and with my last cohort we did:
Learn hyperscript (could be yo-yo too) -> use hyperscript and morphdom and mutate global state -> learn how to write a reducer function in the style of redux. Use that function to calculate a new state. -> Pass a dispatch function into all your hyperscript components -> swap in redux -> swap in react.
Some thoughts and reflections from teaching this at EDA: We used to teach this pathway: React in es6, components with state -> learn jsx -> learn redux -> rip out component state.
A lot of people found this confusing. @mixmix had the idea to flip it around and with my last cohort we did: Learn hyperscript (could be yo-yo too) -> use hyperscript and morphdom and mutate global state -> learn how to write a reducer function in the style of redux. Use that function to calculate a new state. -> Pass a dispatch function into all your hyperscript components -> swap in redux -> swap in react.