Skip to content

guoyunhe/react-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@guoyunhe/react-auth

React components & hooks for authentication. To be used with axios and react-router-dom.

Install

npm i @guoyunhe/react-auth axios react-router-dom

Usage

import { BrowserRouter, Route, Switch } from 'react-router-dom'; // v6
import { AuthProvider } from '@guoyunhe/react-auth';

const App = () => {
  return;
  <BrowserRouter>
    <AuthProvider>
      <Switch>
        <Route></Route>
      </Switch>
    </AuthProvider>
  </BrowserRouter>;
};