Skip to content

Conversation

@kanikaa88
Copy link

This PR improves the explanation in the "Fetching data" section of "You Might Not Need an Effect" to clarify when an Effect is needed versus when it's not.

The previous text was confusing because it said "You don't need to move this fetch to an event handler" which seemed contradictory given the page's title. This change:

  • Clearly states that this IS a case where an Effect IS needed (for synchronization with external system)
  • Explains the key difference: Effects are needed when synchronizing with external systems, regardless of how the state changes
  • Adds a contrast example showing when you would use an event handler instead

This makes it clearer for readers to understand when Effects are appropriate for data fetching.

Closes #8226

@meta-cla meta-cla bot added the CLA Signed label Jan 13, 2026
@github-actions
Copy link

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Mistake]: Wrong example in fetching data section on You Might not need a Effect Page

1 participant