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

Add setContent variant which returns initial snapshot #2548

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

JakeWharton
Copy link
Collaborator


  • CHANGELOG.md's "Unreleased" section has been updated, if applicable.

}

// Defer to allow effect to run.
delay(10.milliseconds)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would yield() be sufficient?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess your goal is to guarantee any amount of yielding would still not get that value

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This is a stand in for arbitrary code that absolutely causes a dispatch. Yield is probably enough, but might not be. Could also be a runCurrent() which is basically what delay becomes in runTest.

@JakeWharton JakeWharton merged commit 7a2bb8d into trunk Jan 30, 2025
11 checks passed
@JakeWharton JakeWharton deleted the jw.set-content-and-snapshot.2025-01-28 branch January 30, 2025 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants