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
Copy file name to clipboardExpand all lines: src/content/blog/2025/04/23/react-labs-view-transitions-activity-and-more.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14303,7 +14303,7 @@ useEffect(() => {
14303
14303
}); // compiler inserted dependencies.
14304
14304
```
14305
14305
14306
-
With this code, the React Compiler can infer the dependencies for you and insert them automatically so you don't need to see or write them. With features like [the IDE extension](#compiler-ide-extension) and [`useEffectEvent`](/reference/react/experimental_useEffectEvent), we can provide a CodeLens to show you what the Compiler inserted for times you need to debug, or to optimize by removing a dependency. This helps reinforce the correct mental model for writing Effects, which can run at any time to synchronize your component or hook's state with something else.
14306
+
With this code, the React Compiler can infer the dependencies for you and insert them automatically so you don't need to see or write them. With features like [the IDE extension](#compiler-ide-extension) and [`useEffectEvent`](/reference/react/useEffectEvent), we can provide a CodeLens to show you what the Compiler inserted for times you need to debug, or to optimize by removing a dependency. This helps reinforce the correct mental model for writing Effects, which can run at any time to synchronize your component or hook's state with something else.
14307
14307
14308
14308
Our hope is that automatically inserting dependencies is not only easier to write, but that it also makes them easier to understand by forcing you to think in terms of what the Effect does, and not in component lifecycles.
Copy file name to clipboardExpand all lines: src/content/learn/reusing-logic-with-custom-hooks.md
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -837,11 +837,13 @@ Every time your `ChatRoom` component re-renders, it passes the latest `roomId` a
837
837
838
838
### Passing event handlers to custom Hooks {/*passing-event-handlers-to-custom-hooks*/}
839
839
840
-
<Wip>
840
+
<Canary>
841
841
842
-
This section describes an **experimental API that has not yet been released** in a stable version of React.
842
+
**The `useEffectEvent`API is currently only available in React’s Canary and Experimental channels.**
843
843
844
-
</Wip>
844
+
[Learn more about React’s release channels here.](/community/versioning-policy#all-release-channels)
845
+
846
+
</Canary>
845
847
846
848
As you start using `useChatRoom` in more components, you might want to let components customize its behavior. For example, currently, the logic for what to do when a message arrives is hardcoded inside the Hook:
0 commit comments