react.dev
react.dev copied to clipboard
The React documentation website
I believe it's important to let readers know that there is a very common pattern for sharing state data across multiple components. That may not be obvious to a learner...

# Tic-Tac-Toe Rule Violation The code in the tutorial allows for overwriting played squares. # Solution Once the `handleClick` function has retrieved squares from state, immediately return if the particular...
I was learning react when I come across this [section](https://reactjs.org/docs/state-and-lifecycle.html#state-updates-may-be-asynchronous) of the documentation. It took me a while before I understand(?) it, I find the explanation lacking so I added...
`unmountComponentAtNode` is used on Testing Recipes. https://reactjs.org/docs/testing-recipes.html However, `unmountComponentAtNode(container)` has been changed to `root.unmount()` in react 18. It also shows to use createRoot. https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html So I replaced it in my...
Unless text nodes or such nodes can be assigned a ref, using the word *node* leads to confusion.
From this issue: https://github.com/reactjs/reactjs.org/issues/4900 . The user clicks the button and it should jump to the page he just viewed. Even if the users directly visits the `language page`, they...