Javascript Meteor.js

Meteor.js page restrictions with react router v4

We can imagine that we have already meteor.js authentication as like Signup Signin & Signout but we have to worry about some pages restriction such as Todo page which is available right now without a user authentication but we need user can access this page after Signin & after Signin he can’t access the Signin & Signuot page.

On react router 4 it has some changes such as history , on the react router < 4 it included with browserHistory but now in 4 it’s not present so we need to install this package from npm such as npm install history and then in routes

Now in the main.js file add the following

That’s it.

Fool Dev

I didn't get trained by the school system like other kids, and when I did concentrate on learning, my mind was cluttered and locked by the programming of the system. © Huey Newton