I am building a application using Facebook flux
architecture of React JS
. I have build the basic part of app where I have a login form. I am fetching t
It worked for me when I added to the react element properties a require for the router and used the router like this:
// this is the redirect
this.context.router.push('/search');
// this should appear outside the element
LoginPage.contextTypes = {
router: React.PropTypes.object.isRequired
};
module.exports = LoginPage;