Skip to content

pr0h0/react-hoouter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React router hooks

React router module using react hooks

    import {Router, Route, Link, Redirect } from 'react-hoouter';

    function App(){
        return (
            <Router>
                <Route path="/" exact component={Home}/> // match only '/' path
                <Route path="/user" component={User}/>   // match any path starting with "/user*"
                <Route componet={NotFound}/>             // Match any route // renders always
                <Link to="/login">Login</Link>           // Change route when clicked to '/login'
                <Redirect to="/notFound"/>               // Force redirect to "/notFound" when rendered // use with caution
            </Router>
    )}

About

React module from routing

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published