kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 195 forks source link

Params empty after FlowRouter.go #638

Closed vnorguet closed 7 years ago

vnorguet commented 8 years ago

Hi, I try to have params working to display alerts correctly. But always get them as an empty hash: Object {}

Here's my code:

Function triggered on button click (or in meteor loginWithFacebook):

const demoClick = (props) => {
  const params = {
    successMessage: 'Connexion réussie!',
  }
  FlowRouter.go('home', params);
}

And the route side, where I expect the params to be filled

FlowRouter.route( '/home', {
  name: 'home',
  action(context) {
    console.log(context);
    mount(LayoutContainer, {
      content: <HomeContainer />,
    });
  },
});

Always have this result: Object {} If I pass queryParams, it's ok. But I don't want users to see the alert message in their url. Thank you for help ;)

Versions: Meteor 1.3.2.4 kadira:flow-router@2.12.1

leizard commented 6 years ago

@vnorguet I had the same issue. How did you solve this ?