pateketrueke / yrv

Your routing vibes! (for Svelte)
https://svelte.dev/repl/0f07c6134b16432591a9a3a0095a80de
161 stars 9 forks source link

Component props #45

Closed ivanbara closed 4 years ago

ivanbara commented 4 years ago

Hi,

Thanks for an excellent svelte router.

How would one pass props to routed components?

E.g.: <Route exact path="/#faq" component={<FAQ prop1=true/>} /> ? (this doesn't work)

pateketrueke commented 4 years ago

Any additional property you assign to <Route /> will be passed down (except private props), e.g.

<Route exact path="/#faq" component={FAQ} prop1=true/>