Javascript – How to fork a route in react-router-dom 6?
I have a route: <Route path="/users/:userId?/:edit?" element={(<Users />)} /> Users is a layout component where I deside what to render based on params. I have a 2 options in this component: If there're no params, then render UsersList component. If…