-
Notifications
You must be signed in to change notification settings - Fork 227
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
dehydrated value of RouteStore contains action
value [fluxible-router v1]
#522
Comments
I think I see what's going on. In previous versions we did not dehydrate the |
Yeah, we already rehydrate the route part correctly, we just don't remove the |
We just extended the RouteStore, overwrote the dehydrate function and stripped out the route. Has been working fine in production for weeks. |
@pwmckenna can you please share a code snippet for this fix? |
class extends RouteStore.withStaticRoutes(routes) {
dehydrate() {
const {
currentNavigate: {
route,
...currentNavigate
},
...dehydrated
} = super.dehydrate();
return {
...dehydrated,
currentNavigate
};
}
} |
When dehydrate RouteStore on server side, the value contains
action
of RouteStore.I’m in troubled that transpiled code is exported to client side by server side setting.
I want the dehydrated value of RouteStore to be abstracted as before.
RouteStore
v0.4.x dehydrated value
v1.0.0 dehydrated value
Steps to reproduce the behavior
- server:
['env', { targets: { node: 'current' } }]
- client:
['env', { targets: { browsers: [...] } }]
action
to create RouteStore.async/await
.-
SyntaxError: Unexpected token '=>'
-
Error: `rehydrate` called with a non-object. Ensure that the parameter passed to rehydrate is a state object produced by a dehydrate call.
The text was updated successfully, but these errors were encountered: