web-routing
v0.0.3
Published
A routing and navigation solution for component-based applications
Downloads
5
Maintainers
Readme
React.js Routing and Navigation
Routing and navigation solution for React.js applications
For more information visit www.kriasoft.com/react-routing
How to Install
$ npm install react-routing --save
Quick Start
import { Router } from 'react-routing';
const router = new Router();
router.use('/', () => require('./components/Layout'));
router.route('/store', () => require('./components/Store'));
router.route('/store/:name', async (state) => {
const component = require('./components/Product');
const data = await http.get(`/api/products/${state.params.name}`);
return [component, data];
});
router.run();
Related Projects
Support
- #react-routing on Gitter
- @koistya on Codementor
License
The MIT License © Konstantin Tarkus (@koistya)