1.0.19 • Published 10 months ago
rw-indirect-router v1.0.19
rw-indirect-router
createHashRouter and createHistoryRouter
import { createHashRouter, createHistoryRouter } from 'rw-indirect-router'
const routes = [
{ path: '/', name:'Home', component: () => <div>Home</div> },
{ path: '/about', name:'About', component: () => <div>About</div> },
]
const hashRouter = createHashRouter(routes)
const historyRouter = createHistoryRouter(routes)
<hashRouter.Link to="/">Home</hashRouter.Link>
<hashRouter.Link to={
path: '/about'
}>About</hashRouter.Link>
<hashRouter.View>
// Not 404
</hashRouter.View>
// or
<historyRouter.Link to="/" exact class active-class exact-active-class></historyRouter.Link>
<historyRouter.Link to={{
name: 'About'
// params
// query
// patch
}}></historyRouter.Link>
<historyRouter.View>
// Not 404
</historyRouter.View>
1.0.19
10 months ago
1.0.18
10 months ago
1.0.17
10 months ago
1.0.16
10 months ago
1.0.15
10 months ago
1.0.14
10 months ago
1.0.13
10 months ago
1.0.12
10 months ago
1.0.11
10 months ago
1.0.10
10 months ago
1.0.9
10 months ago
1.0.8
10 months ago
1.0.7
10 months ago
1.0.6
10 months ago
1.0.5
10 months ago
1.0.4
10 months ago
1.0.3
10 months ago
1.0.2
10 months ago
1.0.1
10 months ago
1.0.0
10 months ago