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

onload / onunload events #47

Closed
kristoferjoseph opened this issue Sep 9, 2016 · 5 comments
Closed

onload / onunload events #47

kristoferjoseph opened this issue Sep 9, 2016 · 5 comments

Comments

@kristoferjoseph
Copy link
Contributor

kristoferjoseph commented Sep 9, 2016

@shama How do you need to write yo-yo components to take advantage of bel's onload / unload behavior?

@yoshuawuyts
Copy link
Collaborator

We're waiting for a new morphdom release to add support for this; I created a lil playground to show off how to create stateful components with morphdom ✨ - we should probably create a nice lil wrapper that can memoize based on arguments at some point, but hope the repo can provide some help for now - cheers! ✌️

See Also

@kristoferjoseph
Copy link
Contributor Author

kristoferjoseph commented Sep 10, 2016

Nice! I'm down to write a wrapper. Did you link to the playground you wrote?

@yoshuawuyts
Copy link
Collaborator

@kristoferjoseph
Copy link
Contributor Author

Did some more experiments and load/unload work currently, but not for cached elements, that was my issue. I see now why you jumped directly to that comment @yoshuawuyts.
Was looking at how diablo is adding more lifecycle events. Would be nice for adding css intro and exit transitions.

@yoshuawuyts
Copy link
Collaborator

@kristoferjoseph I think extra lifecycle events can be evaded by using a finite state machine; onload / onunload should be the only hooks needed at the component level to create css animations. Perhaps take a look at the f1 package for an example of an animation state machine

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

No branches or pull requests

2 participants