Lazy Loading example does not pass props to component
NicolasCwy opened this issue · 0 comments
Describe the bug
Lazy loading example does not pass props to lazily loaded component
Route allows for <Route path="/about" component={About} name={"Bob"} />
which passes the prop name to the rendered component, the example for lazy routes does not have the same behaviour
To Reproduce Steps to reproduce the behavior:
-
Click on the
About
which shows that props are not passed to the lazyily loaded component (value is undefined)
-
Click on
About-Eager
to show expected behaviour when using routes -
Click on
About-LazyFix
to show expected behaviour and possible fix (pass through props as discussed on svelte society)
Expected behavior
Any props that is not meant for route i.e name is passed to the lazily loaded component
<LazyRoute path="/about" component={About} name={"Bob"} />