Skip to content

repo to show possible problem with svero client-side router for Svelte 3

Notifications You must be signed in to change notification settings

LaughingBubba/svero-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Problem with exact prop on Route component

I don't think exact pathing is working as expected.

Given the following routes from App.svelte, I would expect /stooges to render the <Stooges/> component and /stooges/add to only render the <AddStooges/> component. Instead it renders both <Stooges/> and <AddStooges/>.

Further more, I would expect that /stooges/non-existent would only render <h1>404 - Not Found</h1> but it also renders <Stooges/>.

<Router>

	<!-- <Route exact path='/stooges/add' component={AddStooge}/> -->
	<Route exact path='/stooges' component={Stooges}/>
	<Route exact path='/stooges/add' component={AddStooge}/>
	
	<Route fallback path='*'>
		<h1>404 - Not Found</h1>
	</Route>

</Router>

setup

git clone https://github.com/LaughingBubba/svero-example.git
cd svero-example
npm install
npm run dev

About

repo to show possible problem with svero client-side router for Svelte 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published