react-router
Version:
A complete routing library for React.js
64 lines (41 loc) • 1.07 kB
Markdown
Mixes in the navigation methods of the router for convenient routing
from within components.
Methods
-------
See [router.makePath][router.makePath]
See [router.makeHref][router.makeHref]
See [router.transitionTo][router.transitionTo]
See [router.replaceWith][router.replaceWith]
See [router.go][router.go]
See [router.goBack][router.goBack]
See [router.goForward][router.goForward]
Example
-------
```js
import { Navigation } from 'react-router';
React.createClass({
mixins: [ Navigation ],
render() {
return (
<div onClick={() => this.transitionTo('foo')}>Go to foo</div>
<div onClick={() => this.replaceWith('bar')}>Go to bar without creating a new history entry</div>
<div onClick={() => this.goBack()}>Go back</div>
);
}
});
```
[]:
[]:
[]:
[]:
[]:
[]:
[]:
[]: