Answers for "add multiple links to react router dom"

0

how to make multiple link using react

<Router>
    {["/home", "/users", "/widgets"].map((path, index) => 
        <Route path={path} component={Home} key={index} />
    )}
</Router>
Posted by: Guest on June-06-2020

Browse Popular Code Answers by Language