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

Show how to make components #57

Open
mantoni opened this issue Jan 31, 2018 · 1 comment
Open

Show how to make components #57

mantoni opened this issue Jan 31, 2018 · 1 comment

Comments

@mantoni
Copy link

mantoni commented Jan 31, 2018

I’m using the “old” way of registering onload / onunload event handlers to initialize a component store (through emit(‘store:event’)).

This is not directly supported by Choo anymore, but is certainly possible by using some other libraries or native functions.

For example, I have a parameterized route, and based on the parameter I need to fetch some data to show. Likewise, when the user navigates somewhere else, I want to clear the store state to avoid showing “old” information or flickering when the user navigates to the same route again later.

I’d love to see docs describing the recommended way of doing this.

@rook2pawn
Copy link

@mantoni i made this hopefully to help augment ways to shape your app / components, check out the linked repo as well. Let me know if that helps

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