react-router-sans-urls

0.1.2 • Public • Published

React-Router Sans-URLs

Dumbed down version of React-Router without URL's or browser history.

For use with React in environments without URL support, such as inside of the Atom Editor.

Setup

npm i react-router-sans-urls

Usage

import {Router, Route} from 'react-router-sans-urls';
 
import First from './First';
import Second from './Second';
 
/*...*/
render() {
  return (
    // specify the changing route
    <Router route={this.state.route}>
      // include a 'path' and matching 'component'
      <Route path='first' component={<First />}/>
      <Route path='second' component={<Second />}/>
    </Router>
  );
}

Readme

Keywords

Package Sidebar

Install

npm i react-router-sans-urls

Weekly Downloads

0

Version

0.1.2

License

ISC

Last publish

Collaborators

  • shmck