Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to add two elements in one path in react router v6

This is older version looks like
<Route path="/">
 <Header/>
 <Home/>
</Route>

Now you should Write like this in V6

<Route exact path="/" element={<><Header/><Home/></>}/>
 
PREVIOUS NEXT
Tagged: #add #elements #path #react #router
ADD COMMENT
Topic
Name
9+6 =