pateketrueke / yrv

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

exact as default #29

Open frederikhors opened 4 years ago

frederikhors commented 4 years ago

Maybe a breaking change but I think we need this.

From Readme:

<Router>
  <Route exact>Hello World</Route>
  <Route exact path="/svelte-component" component={SvelteComponent}/>
  <Route exact path="/promise" component={import('path/to/other-component.svelte')}/>
  <Route exact path="/async" component={() => import('path/to/another-component.svelte')}/>
</Router>

Can we omit exact? Can we use it as default?

All my routes are exact.

Can we use not-exact or similar for when not exact?

pateketrueke commented 4 years ago

Nope, I mean, we could add exact support on top-level <Router /> so it just inherit down.

But making it default will break nested routes and such.

What do you think?