that are not: • Does it remain unchanged over time? If so, it isn’t state. • Is it passed in from a parent via props? If so, it isn’t state. • Can you compute it based on existing state or props in your component? If so, it definitely isn’t state! https://beta.reactjs.org/learn/thinking-in-react#step-3-find-the-minimal-but-complete-representation-of-ui-state
that are not: • Does it remain unchanged over time? If so, it isn’t state. • Is it passed in from a parent via props? If so, it isn’t state. • Can you compute it based on existing state or props in your component? If so, it definitely isn’t state! →最小限のstateを見つけるのが大切 https://beta.reactjs.org/learn/thinking-in-react#step-3-find-the-minimal-but-complete-representation-of-ui-state
that are not: • Does it remain unchanged over time? If so, it isn’t state. • Is it passed in from a parent via props? If so, it isn’t state. • Can you compute it based on existing state or props in your component? If so, it definitely isn’t state! →最小限のstateを見つけるのが大切 →state同士を同期させるのではなく、Lifting state upで1つのstateにする https://beta.reactjs.org/learn/thinking-in-react#step-3-find-the-minimal-but-complete-representation-of-ui-state