【Docs】Add first log to useEffect synchronous flow description
Overview
This PR corrects the log sequence in the example under Synchronizing with Effects - Putting It All Together.
The current description states:
Now edit the input to say
abc. If you do it fast enough, you'll seeSchedule "ab" logimmediately followed byCancel "ab" logandSchedule "abc" log.
However, in practice, Cancel "a" log appears before Schedule "ab" log.
⬇︎example in motion https://github.com/user-attachments/assets/e09c5c1a-0777-4e28-b1a9-609f32983f74
Updated the description to accurately reflect the log order:
Now edit the input to say
abc. If you do it fast enough, you'll seeCancel "a" logimmediately followed bySchedule "ab" log,Cancel "ab" logandSchedule "abc" log.
This ensures the explanation aligns with the actual behavior of the effect cleanup process.
Relevant section.
https://react.dev/learn/synchronizing-with-effects#putting-it-all-together
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| 19-react-dev | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 10, 2025 7:27am |
| react-dev | ✅ Ready (Inspect) | Visit Preview | Mar 10, 2025 7:27am |
Size changes
📦 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! 🙌