@mukeshsoni
reactjs bangalore meetup #34
Bottom up - No high level design
Thinking in React
Just draw boxes around UI components!
Only takes you so far!
https://reactjs.org/docs/thinking-in-react.html
the action against an event can depend on the state of other UI objects
Start by writing simple event handler
Event-action paradigm consequences
https://github.com/mukeshsoni/react-telephone-input
Source: Are statecharts the next big UI paradigm? by Luca Matteis
Url: https://www.slideshare.net/lmatteis/are-statecharts-the-next-big-ui-paradigm
Source: Are statecharts the next big UI paradigm? by Luca Matteis
Url: https://www.slideshare.net/lmatteis/are-statecharts-the-next-big-ui-paradigm
Alternative approach - Top down thinking
We all implement an ad-hoc FSM in our UI code!
Source - Constructing the User interface with statecharts by Ian Horrocks
Invented by David Harel in 1987
Source - Constructing the User interface with statecharts by Ian Horrocks
Source - Constructing the User interface with statecharts by Ian Horrocks
Source - Constructing the User interface with statecharts by Ian Horrocks
Source - Constructing the User interface with statecharts by Ian Horrocks
xstate - https://github.com/davidkpiano/xstate
If we are in state S and the event E occurs, we should perform the actions A and make a transition to the state S'.
Erlang FSM Design Principles
http://erlang.org/documentation/doc-4.8.2/doc/design_principles/fsm.html
https://www.popularmechanics.com/space/moon-mars/a19564346/nasas-curiosity-rover-hits-2000-sol-martian-day-milestone/
https://blog.nomagic.com/statechart-autocoding-curiosity-rover/
David Khourshid (@davidkpiano) - Infinitely better UIs with Finite Automata - https://www.youtube.com/watch?v=VU1NKX6Qkxc