React Memory Router Tutorial

Posted in Uncategorized

Tweet This Share on Facebook Bookmark on Delicious Digg this Submit to Reddit

Continuing from previous React Router 5 tutorial, now we take a look a React’s memory router.

Our list of routes remains the same …

However, instead of importing BrowserRouter from react-router-dom, we import MemoryRouter instead. But we import it as Router just the same so that we don’t have to change the code…

And it works exactly the same as before…

Except you know longer see the URL changes. The route changes behind-the-scenes.