1`yarn add react-router` or `npm install react-router`
2
3import { useHistory } from 'react-router'
4const history = useHistory()
5history.go(0)
1import React from "react";
2import { Link } from 'react-router-dom';
3
4export class ToolTip extends React.Component {
5 render() {
6 return (
7 <Link to="/My/Route">Click Here</Link>
8 )
9 }
10};
1// Add the following to .htaccess file in the public folder
2// NOTE: This is for Apache servers!
3
4<IfModule mod_rewrite.c>
5 RewriteEngine On
6 RewriteBase /
7 RewriteRule ^index\.html$ - [L]
8 RewriteCond %{REQUEST_FILENAME} !-f
9 RewriteCond %{REQUEST_FILENAME} !-d
10 RewriteCond %{REQUEST_FILENAME} !-l
11 RewriteRule . /index.html [L]
12</IfModule>
13