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

call all effects on the actions queue #4

Closed
wants to merge 3 commits into from

Conversation

Atrue
Copy link

@Atrue Atrue commented Feb 15, 2022

Depends on #3
See only the latest commit.

The current behaviour:
The first effect is called immediately after the initialization of the component/model, so it may have unexpected results, like this:

Error: Assertion Failed: You attempted to update someProp on someModel, but it had already been used previously in the same computation. Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.

Expected behaviour:
The first effect should be also called in the actions queue, to be safe to update any tracked properties there.

@Atrue Atrue mentioned this pull request Feb 22, 2022
@BryanCrotaz
Copy link
Owner

BryanCrotaz commented Feb 22, 2022

implemented in 19428a6

Thanks for the idea!

EDIT:

On further checking, was already running all effects in the actions queue

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