-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
nested props are marked as missing when changing route and using keep-alive #2301
nested props are marked as missing when changing route and using keep-alive #2301
Comments
The warning shouldn't be appearing, indeed |
Would like to add that in a real project if a component is binded on that props (apollo, computed prop rendering), this makes a huge impact to the page, ex.: one route for an animal description, species is passed by the param. Temporary solution is to exclude the targeted component from keep-alive (if keep-alive is defined at the framework/application level), but this breaks the whole interest of caching. |
In my case I am also |
I wonder what are recommendations here. Is this bug going to be fixed this year / eventually? Or the whole thing about |
Is there any way to prevent this? Any kind of workaround? It's been over half a year and the messages are quite "spamming" the console if you're having a lot of views and properties, also resulting in erroneous views because of the "empty" properties. |
I am also experiencing this problem. Apart from the fact that it is annoying to see all kind of errors in the console, it can actually cause problems. For example, I have a computed property based on one of the I am not a pro when it comes to the core code of Vue, but maybe it is an idea to sort of 'fix' the |
Closes #2301 * fix(router-view): add passing props to inactive component * test(keep-alive): add more cases for props * test(keep-alive): adapt tests * refactor(view): rename function Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
Version
3.0.1
Reproduction link
https://jsfiddle.net/Terrijoo/pntLxf20/
Steps to reproduce
/home
Info
/foo
What is expected?
The props still being "there" and no warning about the missing required prop.
What is actually happening?
The props are apparently removed/emptied and vue throws a warning.
It's a combination of several circumstances:
router-view
needs to be wrapped bykeep-alive
/home
/foo
The text was updated successfully, but these errors were encountered: