Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react router v6 wrapped routes in separate files

//Allows to make wrapped routes

<Routes>
  <Route path="/welcome/*" element={<Father />} />
</Routes>

//In Father Component
<Routes>
<Route path="user" element={<WelcomePage />}/>
</Routes>
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #react #router #wrapped #routes #separate #files
ADD COMMENT
Topic
Name
8+6 =