Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Docs】Add first log to useEffect synchronous flow description #7677

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

k35o
Copy link
Contributor

@k35o k35o commented Mar 10, 2025

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 see Schedule "ab" log immediately followed by Cancel "ab" log and Schedule "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 see Cancel "a" log immediately followed by Schedule "ab" log, Cancel "ab" log and Schedule "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

Copy link

vercel bot commented Mar 10, 2025

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

Copy link

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! 🙌

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.

None yet

2 participants