Closed lazywei closed 9 years ago
You'd need to create a mixin to simplify that and mix it into your routes like previously. I think the only difference is now react-router won't be supplying that mixin.
I'm thinking about it. Reapp is in alpha, but this release especially is shaky because both react-router and our theme engine moved to React 0.13 and new ways of using context.
It almost feels like React is asking for Decorators now. I use reapp-component for this. The hacker-news-app uses them if you want a demo. Basically you could mixin the router mixin everywhere.
I'm thinking about better ways to handle all this. I want to make reapp simpler than it is now, but still flexible. I think it's almost to the point where we can just say "react-router has won" and commit to it and that would open up some stuff to be easier.
I will say personally, I don't mind the this.context.router
syntax. It's more verbose, but it's also less magical than before. But I understand where you're coming from.
Got it. Thanks for explanation.
I will say personally, I don't mind the this.context.router syntax. It's more verbose, but it's also less magical than before.
I definitely agree with you on this! Honestly, this.transitionTo
made me confused for a while that I don't know where it comes from until I trace the source code.
Now I understand your designation, and I totally agree with your direction.
Good work! Thanks! :+1:
Hi,
I notice that in the latest version of
reapp-routes
, we need to usethis.context.router.transitionTo
instead ofthis.transitionTo
. I'm wondering why we should do this. What's the cons of using the old way to access the react-router's transitionTo?Thanks.