I\'ve read many things about react-router v4 and the npm history library to this point, but none seems to be helping me.
My code is functioning as expected up to t
import Router from react-router-dom not BrowserRouter
// index.js
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import { Router } from "react-router-dom";
import history from './utils/history'
ReactDOM.render(
,
document.getElementById("root"));
serviceWorker.register();
// history.js
import { createBrowserHistory } from 'history';
export default createBrowserHistory();
on other components that you need to navigate import history and push
import History from '../utils/history'
History.push('/home')