-
Notifications
You must be signed in to change notification settings - Fork 277
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 some more details about batch #592
base: main
Are you sure you want to change the base?
Conversation
Run & review this pull request in StackBlitz Codeflow. |
✅ Deploy Preview for solid-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Please hold this PR we are still trying to clarify some points that may or may not lead to some small change. |
If it's not ready for review, please put it as a draft! |
e2507de
to
e132394
Compare
hey @titoBouzout , I lost track of this convo. What came out of it? |
…gnals in batch, and reference to batch from create-effect
e132394
to
de39208
Compare
Top level effects aren't batched, regular effects are batched. The idea was to batch them all to make them consistent. While the change is welcome solidjs/solid#2107 this probably will take effect on solid 2.0 to avoid unnecessary behavior changes, which sounds like a sensible option and this pr could probably be reviewed I guess |
This PR is the follow up from a conversation in the discord, where someone tested the behavior of
createEffect
and found it wasn'tbatch
ed. This PR addresses the confusion by documenting whencreateEffect
is automaticallybatch
ed, and when it isn't. It also adds another piece of information I felt was missing from thebatch
docs, namely the expected behavior when setting and then accessing a signal within abatch
. This behavior used to be different pre-v1.4 which makes it additionally useful as a documentation of a breaking change.In summary, this PR clarifies:
createEffect
is not batched outside root / at top level