Lazy Loading example does not pass props to component
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
Aboutwhich shows that props are not passed to the lazyily loaded component (value is undefined) -
Click on
About-Eagerto show expected behaviour when using routes -
Click on
About-LazyFixto 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"} />