Using create-react-app with React Router + Express.js
Patricio López Juri
2K48

The history undefined warning and display issue can be fixed with:

npm install react-router-dom --save

And then altering the import statement in routes.js to:

import { BrowserRouter as Router, Routes } from 'react-router-dom'

Then I placed the three <Route />s in a <div>.

https://stackoverflow.com/questions/43008036

Like what you read? Give Bill Davis a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.