react.dev
react.dev copied to clipboard
The React documentation website
This PR adds the `experimental_useEffectEvent` page to the API reference menu. As this hook is being referenced in the learn section but the page wasn't visible in the menu (while...
Issue link : [#6599](https://github.com/reactjs/react.dev/issues/6599) Added an explanation text to prevent misunderstanding of usage `useContext` with `useMemo`. The text that was added is from the issue description. #6599 Also added a...
Issue link : [#6489](https://github.com/reactjs/react.dev/issues/6489) Updated `window` object to `document` in `src/content/reference/react/Suspense.md` at line no. 2531.
Removed the redundant alternative state management suggestion. The documentation already emphasizes the elimination of duplication by advising to hold the selected ID in state, making the alternative suggestion unnecessary.
### Summary After solving the challenge correctly, the code gets disconnected from sandbox.  ### Page https://react.dev/learn/writing-markup-with-jsx ### Details _No response_
I believe the `onChange` event handler shouldn't be declared as a dependency on the following `useEffect` example, because although this is a `prop`, its value should not change, so it's...
Clarify the ["I’m getting an error: “The result of getSnapshot should be cached”](https://react.dev/reference/react/useSyncExternalStore#im-getting-an-error-the-result-of-getsnapshot-should-be-cached) section of the `useSyncExternalStore` API reference documentation. I put some notes about why the documented error occurs...
Fixes #6601 With this change the example makes sense, since you can't call `useFormState` in a server component.
### Summary The "Display a form submission error without JavaScript" section on the form element docs page states the following, among other things: ``` Displaying a [...] error message [...]...