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

Fire intro.start and outro.start events #705

Merged
merged 2 commits into from
Jul 10, 2017
Merged

Fire intro.start and outro.start events #705

merged 2 commits into from
Jul 10, 2017

Conversation

Rich-Harris
Copy link
Member

Fixes #702. This PR looks slightly more involved than might be expected from the title, which is because I think we need to satisfy the following constraints:

  • [in|ou]tro.start events should fire during component.set(...), not in the next tick. That way, it's easy to collect all the start events associated with a particular update — could get confusing otherwise
  • It should be possible to do this.on('intro.start', ...) inside oncreate in time to capture any intros that happen on initial render

Because of that, we need to separate _oncreate from _postcreate, and control the order in which functions are called. I think the end result is actually slightly more logical/readable than what we had before.

@Rich-Harris Rich-Harris merged commit b2dd6e3 into master Jul 10, 2017
@Rich-Harris Rich-Harris deleted the gh-702 branch July 10, 2017 11:37
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.

1 participant