Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

multiple path names for a same component in react router

<Router>
    {["/home", "/users", "/widgets"].map((path, index) => 
        <Route path={path} component={Home} key={index} />
    )}
</Router>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #multiple #path #names #component #react #router
ADD COMMENT
Topic
Name
5+4 =