React Router Authorization

Каковы оптимальные методы проверки авторизации перед монтированием компонента?

Я использую React-роутер 1.x

Вот мои маршруты

React.render((
  <Router history={History.createHistory()}>
    <Route path="/" component={Dashboard}></Route>
    <Route path="/login" component={LoginForm}></Route>
  </Router>
), document.body);

Вот мой компонент Dashboard:

var Dashboard = React.createClass({
  componentWillMount: function () {
    // I want to check authorization here
    // If the user is not authorized they should be redirected to the login page.
    // What is the right way to perform this check?
  },

  render: function () {
    return (
      <h1>Welcome</h1>
    );
  }
});

Ответы на вопрос(3)

Ваш ответ на вопрос