DHIS2 React App - transitioning from one component to another using react-router-dom

Yes! :smiley: Thanks for the correction @nnkogift!

Not in React Router v6. So you’d instead be using <Routes><Route /></Routes> and like Gift corrected, we should now use element instead of component. :smiley:

And @nnkogift, also exact has been removed. I just read this:
* <Route exact> is gone. Instead, routes with descendant routes (defined in other components) use a trailing * in their path to indicate they match deeply example: <Route path=“users/*” element={} />

@Orly_MUGWANEZA Please let us know if the code Gift shared worked. Thank you!

1 Like