1.0.19 • Published 9 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
9 months ago
1.0.18
9 months ago
1.0.17
9 months ago
1.0.16
9 months ago
1.0.15
9 months ago
1.0.14
9 months ago
1.0.13
9 months ago
1.0.12
9 months ago
1.0.11
9 months ago
1.0.10
9 months ago
1.0.9
9 months ago
1.0.8
9 months ago
1.0.7
9 months ago
1.0.6
9 months ago
1.0.5
9 months ago
1.0.4
9 months ago
1.0.3
9 months ago
1.0.2
9 months ago
1.0.1
9 months ago
1.0.0
9 months ago