diff --git a/package.json b/package.json index f6a74772d..fbc747541 100644 --- a/package.json +++ b/package.json @@ -15,5 +15,17 @@ "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] } } diff --git a/src/App.js b/src/App.js index 8dcc53b0b..599123413 100644 --- a/src/App.js +++ b/src/App.js @@ -1,10 +1,15 @@ import React from 'react'; import './App.css'; import { Home, About, Contact, Navigation } from './components'; +import { Route } from 'react-router-dom'; const App = () => (
+ + + +
); diff --git a/src/components/Navigation.js b/src/components/Navigation.js index 2a0b35d9e..aa57fd36e 100644 --- a/src/components/Navigation.js +++ b/src/components/Navigation.js @@ -1,4 +1,5 @@ import React from 'react'; +import { Link } from 'react-router-dom'; const Navigation = () => { return ( @@ -6,13 +7,19 @@ const Navigation = () => {

React Router Mini

- Home + + Home +
- About + + About +
- Contact + + Contact +
diff --git a/src/components/index.js b/src/components/index.js index c87ce176a..6c1836e02 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -3,4 +3,6 @@ import About from './About'; import Contact from './Contact'; import Navigation from './Navigation'; + + export { Home, About, Contact, Navigation }; diff --git a/src/index.js b/src/index.js index a682d5a8a..68d28b984 100644 --- a/src/index.js +++ b/src/index.js @@ -3,5 +3,11 @@ import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import 'bootstrap/dist/css/bootstrap.css'; +import { BrowserRouter as Router} from 'react-router-dom'; -ReactDOM.render(, document.getElementById('root')); +ReactDOM.render( + + +, + +document.getElementById('root'));