My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

With react-router and a flux implementation like Alt/Reflux how do you handle routing?

Joel Jensen's photo
Joel Jensen
·Aug 30, 2015

I am using Alt and react-router. Whenever I need to trigger a route change I do the following :

showBlogPost : function(e){
  e.preventDefault();
  PostActions.loadPost(id,function(){
    this.context.router.transitionTo(url);
  });
}

But this becomes too difficult to manage. Is this the right approach? Or do you recommend listening to a global route change event and load data into stores at that time?