You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code example on "How does React know which state to return?" Deep Dive section in the "State: A Component's Memory" page is using the setState function before defining it. While this code would work due to function hoisting in javascript, it's generally is not recommended, especially as it disturbs the reading flow for code snippets.
Summary
The code example on "How does React know which state to return?" Deep Dive section in the "State: A Component's Memory" page is using the
setState
function before defining it. While this code would work due to function hoisting in javascript, it's generally is not recommended, especially as it disturbs the reading flow for code snippets.Page
https://react.dev/learn/state-a-components-memory#how-does-react-know-which-state-to-return
Details
No response
The text was updated successfully, but these errors were encountered: