React Router Guard
npm install react-router-guard 
``bash`
npm install --save react-router-guard`
yarnbash`
yarn add react-router-guard
javascript
import React from 'react';
import ReactDOM from 'react-dom';
/*
Because we don't need to install react-router-dom so you can use Link or NavLink from 'react-router-guard'
import { RouterGuard, BrowserRouter, Link, NavLink, Redirect, Route, Router, Switch, history, withRouter, Loadable } from 'react-router-guard';
*/
import { RouterGuard } from 'react-router-guard';
import config from './config';function App() {
return (
);
}const rootElement = document.getElementById('root'); // eslint-disable-line
ReactDOM.render( , rootElement);
``| name | type | description |
|---|---|---|
| config | RouterGuardConfigProps[] | The config for render all route |
| history | createBrowserHistory() | To use custom history |
React Router Guard
MIT © TSL
=======