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

Remove pointless Walk through the $nextTick #289

Merged

Conversation

ahmedkandel
Copy link
Contributor

Closes #287

@calebporzio
Copy link
Collaborator

Please provide a more thorough explanation. (I know you referenced a GH issue, but I'd still like more clarity on this contribution. Also, tests would be a great way to demonstrate its use, thanks!)

@ahmedkandel
Copy link
Contributor Author

Sure, in component.js we "walk through the $nextTick stack and clear it as we go" in three different places. Under initializeElements() and updateElements() which is expected, But also under valueMutated() > debounce() which i think it is useless and make some confusion.

The point is inside debounce() we call updateElements() which clears out the nextTickStack so after updateElements() finishes there will not be any remaining expressions in nextTickStack.

The current $nextTick test already passes after removing this part which means it still working as expected.

@calebporzio
Copy link
Collaborator

Thanks! Good catch!

@calebporzio calebporzio merged commit e43031b into alpinejs:master Mar 29, 2020
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.

$nextTick after component update or after render?
2 participants