Matterholt
2020-11-02
Working with Manage State and Derived State. Manage state is state that is explicitly manage, where Derived State is calculated base on other state such as calling a function to. when building the Tic tac toe app using derived state, It all depends on a declared function. Where the only manage state is the array value called squares.
Kent’s steps for working with new App
In react don’t modify state being manage, could cause bugs, and react relies on updated state on change, by mutating state directly may lead to bugs that is difficult to debug
so how could this be implemented in my Hour log? Derived State could be the hours worked for the day.
maintain state
current state now what currently on
what what square represented by that step at the current state
get the UI set up before interactivity and state management