I have started to rewrite my Meteor app with React + Meteor. I am currently using Flow-Router as the Routing Framework for React.
IN the previous version of my app when I was using iron-router
, when I click back on the browser, the page gets displayed very quickly without having to refresh.
However, I have noticed that with Flow-Router, if I click on the back button, the whole website refreshes.
Currently with Flow Router I only have 2 routes:
FlowRouter.route('/', {
action: function(params, queryParams) {
console.log("Yeah! We are on the /", params.postId);
ReactLayout.render(Sidebar, {
});
}
});
FlowRouter.route('/managedata', {
action: function(params, queryParams) {
console.log("Yeah! We are on the managedata", params.postId);
ReactLayout.render(Sidebar, {
content: <ManageData />
});
}
});
What should I do to activate the 'history'??
So that when the back button is clicked it just renders the previous page without having to refresh just like iron-router
does