-
Notifications
You must be signed in to change notification settings - Fork 59
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
Rational: why no effects out of the box? #242
Comments
I think it'd be nice to expand on "effects require an ownership model", which I think is very tied into "effects should be run by a scheduler" (which is how I would summarize the first point). Ownership is important because it would be used by the scheduler to order effects so that other side effects of changing state that naturally occur in ownership-tree-order are done in a coherent way. The main example being a UI component tree and needing to run component-associated effects in tree order so that parents render first, and if parents pass data to children that are also responding to signal changes, that the child only renders once. This is my understand of the technical reason to prefer to push effects out to a library that would presumably also handle scheduling. Clarifying this might make the stance make more sense to some of the people who are asking for built-in effects. It might also outline what would be necessary to have either a good built-in effect, or some kind of hooks for scheduling effects. |
I'm not sure how to interpret 👎 on this issue. Are they asking to not state the rationale? |
I'm not sure either @justinfagnani. I think the request is more than reasonable. Unfortunately, I wasn't present when some of the discussion around this was happening, leading up to the initial proposal. Perhaps @milomg has some insights he can share. |
We've had a number of issues about effects
EagerEffect
for convenience #136The gist somewhat comes down to a difference in opinion of the necessity for effects.
Also, there are different kinds of effects.
In particular, in the js-reactivity-benchmark -- it can only test with synchronous effects -- see this issue on environments without such a concept maybe being unbenchable as a result (or at least, necessitates macro benching).
A summary (of what I can remember right now) of the stances:
The text was updated successfully, but these errors were encountered: