-
Notifications
You must be signed in to change notification settings - Fork 597
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
I want to refetch data when i switch route, is the subscriptions' right place to work with? #166
Comments
You'd want to be using https://github.com/shama/bel#lifecycle-events - they've got a few bugs at the moment, but it should get you there I reckon ✨ |
on-load still can't fetch data sometimes when switch route |
@crapthings const view = (state, prev, send) => {
if (!prev.params || !prev.params.user || prev.params.user !== state.params.user) {
send('fetch', state.params.user)
}
return html`<div>...</div>`
} (Also note that views don't have a |
Closing because |
what is best practical or preferred way to get inital data when switch route ?
users.js
model.js
The text was updated successfully, but these errors were encountered: