react.dev
react.dev copied to clipboard
The React documentation website
# Docs: Clarify `useEffect()` non-primitive dependency pitfall ## Closes: #8156 ## Description: This PR addresses issue #8156 by clarifying the behavior of the `useEffect()` dependency array when non-primitive values (objects...
Adding [ZurichJS Conf 2026](https://conf.zurichjs.com/) to the list of React community conferences
Docs: Clarify the behavior of useEffect with non-primitive dependencies in the Hooks documentation
Issue Body (Example): 🗣 Area of Concern: The documentation section for the useEffect hook currently explains the dependency array primarily using primitive values (e.g., numbers, strings). However, the common pitfall...
### Summary ### Page https://react.dev ### Details _No response_
Removed unused import of useState from React. ```javascript import { useState, useEffect } from 'react'; import { createConnection } from './chat.js'; const serverUrl = 'https://localhost:1234'; const roomId = 'general'; export...
Issue Body (Example): 💡 Problem: Currently, to implement an Error Boundary in a React application (a component that catches JavaScript errors anywhere in its child component tree, logs those errors,...
This PR removes the unused `useContext` import from the `AddTask` and `TaskList` examples on the **useContext reference page**. These examples use custom hooks (`useTasks`, `useTasksDispatch`) and no longer call `useContext`...
### Summary The code example on the "useContext" page includes an unused import `useContext` ### Page https://react.dev/reference/react/useContext#scaling-up-with-context-and-a-reducer ### Details The code in useContext hook documentation in the examples for updating...