link in react router example
Example 1: react router Link does work
import { Link } from 'react-router-dom';
Example 2: Link react router
<Link to="/about">About</Link>
Example 3: how to export switch from react-router-dom
let routes = (
<Fade>
<Switch>
{}
<Route />
<Route />
</Switch>
</Fade>
);
let routes = (
<Fade>
{}
<Route />
<Route />
</Fade>
);
Example 4: react router link
import React from "react";
import ReactDOM from "react-dom";
import { Router } from "react-router";
import { createBrowserHistory } from "history";
const history = createBrowserHistory();
ReactDOM.render(
<Router history={history}>
<App />
</Router>,
node
);