AlexxNB / tinro

Highly declarative, tiny, dependency free router for Svelte's web applications.
MIT License
675 stars 30 forks source link

Path parameters with lazy loading #35

Closed ritchieanesco closed 3 years ago

ritchieanesco commented 3 years ago

Hi guys,

Really great work with this library! Is it possible to use path parameters with lazy loading? I'm wondering how you would go about passing parameters as props to something lazy loaded.

AlexxNB commented 3 years ago

Here two ways to use params in Lazy loaded components:

https://svelte.dev/repl/77594e4f987b4f63a8c30aadaa9f6de4?version=3.31.0

ritchieanesco commented 3 years ago

Thanks @AlexxNB. Got it working with your example.