2.3.1 • Published 2 years ago

react-router-guard v2.3.1

Weekly downloads
65
License
MIT
Repository
github
Last release
2 years ago

NPM JavaScript Style Guide

Install

npm

npm install --save react-router-guard

yarn

yarn add react-router-guard

Introduction

React Router Guard is a router structure base on react-router-dom, when you install react-router-guard you don't need to install (react-router-dom, history, react-loadable) because it uses these packages as dependencies, it gives you some cool feature like router-config, code splitting, router authentication support, dynamic redirect for more information please read the demo and docs

Usage

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 (
    <div className="App">
      <RouterGuard config={config} />
    </div>
  );
}

const rootElement = document.getElementById('root'); // eslint-disable-line
ReactDOM.render(<App />, rootElement);

API

Docs

Migrating from 1.x to 2.x

Docs

Screenshot & Demo

Demo

React Router Guard

License

MIT © TSL

2.3.1

2 years ago

2.3.0

4 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago