why /index.html redirect to / react router dom code example
Example 1: react router dom IndexRedirect
$ npm install --save react-router-dom
Example 2: react router dom IndexRedirect
// using ES6 modulesimport { BrowserRouter, Route, Link } from "react-router-dom"; // using CommonJS modulesconst BrowserRouter = require("react-router-dom").BrowserRouter;const Route = require("react-router-dom").Route;const Link = require("react-router-dom").Link;