Alexander Gundermann
Alexander Gundermann
> or you can probably save transition object somewhere (in a static property on component?) and use it in componentDidMount. I don't think that will work since you'd be triggering...
Sorry about that :smile: If I'm finally understanding this right, there are actually two problems: 1. Transitioning to `/login` if some data fetching within `componentDidMount` fails 2. Transitioning from `/login`...
> like DefaultRoute, matches when no other child route matches That's not what DefaultRoute is. You're describing NotFoundRoute. DefaultRoute matches if the parent's path matches exactly (.. and no other...
> But ya, we should probably make this easier. How about adding `path` to `DefaultRoute`? ``` js ``` Makes sense, doesn't it?
You can use setTimeout: ``` js .catch(function (err) { setTimeout(function(){ throw err; }, 0); }); ``` Or simply: ``` js .catch(function (err) { SignIn.attemptedTransition = transition; transition.redirect('sign-in'); }).then(function(){ setTimeout(function(){ callback();...
> transition.redirect('users', {params: {id: 1}}); should be `transition.redirect('users', {id: 1});`.
You could store your (inner) JSX routes on `Handler.statics`: ``` js var Handler = React.createClass({ statics: { routes: [, ..] } } var routes = ( {Handler.routes} ); ```
Not sure if that's intentional or not. Your scenario looks a lot like the one in #883 though.
Strictly speaking, you don't want to break up your route definitions since they are needed to generate links, among others. What you probably want to do is split up your...
You should try DefaultRoute. Edit: The configuration you posted above looks fine to me. What's the problem with it exactly?