How can I move to using https://cdnjs.cloudflare.com/ajax/libs/react-router/4.0.0-2/react-router.min.js
from using https://cdnjs.cloudflare.com/ajax/libs/
This is a supplement answer to the one Paul S posted above. Credit should still goto paul for posting it.
Reason m supplementing the answer is bcoz:-
yarn steps:
yarn add react-router
yarn add react-router-dom
package.json:
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-router": "^4.1.1",
"react-router-dom": "^4.1.1"
index.js:
import React from 'react';
import ReactDOM from 'react-dom';
import { Switch, Redirect, Route} from 'react-router';
import {BrowserRouter, Link} from 'react-router-dom';
//let { BrowserRouter, Switch, Redirect, Route, Link } = ReactRouter;
const Main = () =>
const App = props =>
Map
Settings
Foo
{props.children}
const Navigation = props =>
const Home = () => Home
const Map = () => Map
const Settings = () => Settings
const Foo = () =>
const NotFound = (props) => 404 - Not Found
ReactDOM.render(, document.body);