Minimal Routing for React.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
docs
src
.babelrc
.eslintrc
.gitignore
.travis.yml
LICENSE
README.md
code-of-conduct.md
package-lock.json
package.json
server.js
test.js
webpack.config.js
webpack.dist.config.js

README.md

React Roadway

Minimal Routing for React

Installation

npm install react-roadway --save

Examples

const Home = createRoute((props) => (
  <div>
    <h1>Home</h1>
  </div>
));

const About = createRoute((props) => (
  <div>
    <h1>About</h1>
  </div>
));

const App = createRouter(() => (
  <div>
    <nav>
      <ul>
        <li><Link href="/">Home</Link></li>
        <li><Link href="/about">About</Link></li>
      </ul>
    </nav>
    <Home match="/" />
    <About match="/about" />
  </div>
));

render(<App />);

Contributor Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

MIT Copyright (c) 2017 Opentrace