Closed ivanbara closed 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)
<Route exact path="/#faq" component={<FAQ prop1=true/>} /> ? (this doesn't work)
Any additional property you assign to <Route /> will be passed down (except private props), e.g.
<Route />
<Route exact path="/#faq" component={FAQ} prop1=true/>
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)