Closed wildhart closed 7 years ago
I have a fix for it (dunno if it's the fix yet).
In the meantime, is there a way for you to update the router? I get a ton of warnings and errors and it's hard to know if VM is doing something wrong or if it's the router.
What errors are you getting? Ignore the index route, that has some errors because this.id()
is not defined, but on the /defer/foo
route I don't get any errors on the client or server. All I get in the client is the warning Warning: Accessing PropTypes via the main React package is deprecated...
I'm using react-router 3.0.5
It was the warnings.
This is fixed with viewmodel-react-plugin v3.0.3
. Let me know if you run into any other issues.
With react-router, params on the url are passed to the component, e.g:
If the child component contains another child which is deferred, and passes the params to the child like so:
When the route changes from
defer/foo
todefer/bar
the value ofthis.id()
inside the home component does not change. Alsothis.props.id
does not change, butthis.parent().props.params.id
does change.If you remove the
b="defer: true"
then they all change as expected.I've created a repro here: https://github.com/wildhart/viewmodel-react-starter-meteor-ssr/tree/bug_defer_props