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
"props" option works differently than explained in the docs when defining multiple components on a route, #1183
Comments
I think this is "only" a problem of lacking documentation. Looking at the source here and here, it's clear that the intended usage with multiple components is this: {
path: '/multiple/:test_prop',
components: {
default: Bar,
a: Foo
},
props: {
default: true,
a: (route) => ({ test_prop: route.params.test_prop })
}
} With that, it works as intended: https://jsfiddle.net/Linusborg/6du90epg/237/ And this makes sense, because in most scenarios, each component will/might need a different set of props. |
Yup, that works perfectly. Thank you. |
Re-opened because we still have to track improvement of docs here. ;) |
merged imrpoved docs section, have to republish again tonight, though. |
ReaderToolbar got no props |
Given a route entry like this:
Neither component Foo or Bar will receive the
test_prop
propWorking example of issue https://jsfiddle.net/6du90epg/231/
The text was updated successfully, but these errors were encountered: