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