State Machines
i write my own thoughts and what i understand, if you are reading this i recommend you to watch or read more standard blogs to get full gist of state machines
STATE MACHINES:
Firstly we need to understand what state means before understanding what state machines do.
State means - the current position you are in - and now you have different possibilities/options to move forward.
Example: if i am switch - then i have 2 possible states - either its turn on or turn off
when i am turned on - the only possible way is to turn off that's the only state
State of machine represents everything that is defined in its global space
To understand more deep about state machines i recommend you studying Theory of computation.
Like we discussed, a state for a switch is on and off, likewise when we talk about react stage-management, its the same, state management in react exist to manage the flow of data - the data the user wants to see