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

Support nonReactive(() => ...) to avoid encouraging the sledgehammer noContext #510

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

benjamn
Copy link
Owner

@benjamn benjamn commented Mar 22, 2023

The drawback of noContext is that it censors all contextual Slot values from the inner function's context, when the only Slot used by optimism is the parentEntrySlot.

The new nonReactive function is like noContext, but it censors only parentEntrySlot, to avoid registering dependencies while executing certain code known/suspected to contain functions wrapped by optimism.

@benjamn benjamn self-assigned this Mar 22, 2023
Copy link

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

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

🎉 Thanks for introducing this!

@benjamn benjamn merged commit 007eaf4 into main Mar 24, 2023
@benjamn benjamn deleted the nonReactive branch March 24, 2023 17:01
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.

None yet

2 participants