1 | # RouterMixin
|
2 | `RouterMixin` is a React mixin to be used by application's top level React component to:
|
3 |
|
4 | * [manage browser history](#history-management-browser-support-and-hash-based-routing) when route changes, and
|
5 | * execute navigate action and then dispatch `CHANGE_ROUTE_START` and `CHANGE_ROUTE_SUCCESS` or `CHANGE_ROUTE_FAILURE` events via flux dispatcher on window `popstate` events
|
6 | * [manage scroll position](#scroll-position-management) when navigating between pages
|
7 |
|
8 | ## Example Usage
|
9 | ```js
|
10 | var RouterMixin = require('flux-router-component').RouterMixin;
|
11 |
|
12 | var Application = React.createClass({
|
13 | mixins: [RouterMixin],
|
14 | ...
|
15 | });
|
16 | ```
|