Skip to content
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

Lazy Loading example does not pass props to component #110

Open
NicolasCwy opened this issue Jun 14, 2023 · 0 comments
Open

Lazy Loading example does not pass props to component #110

NicolasCwy opened this issue Jun 14, 2023 · 0 comments

Comments

@NicolasCwy
Copy link

NicolasCwy commented Jun 14, 2023

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:

  1. Click on the About which shows that props are not passed to the lazyily loaded component (value is undefined)
    image

  2. Click on About-Eager to show expected behaviour when using routes

  3. Click on About-LazyFix to show expected behaviour and possible fix (pass through props as discussed on svelte society)
    image

Svelte Repl

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"} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant