Open serkandurusoy opened 7 years ago
So let's see if I understood well :) It'll become:
!Meteor.loggingIn() && !Meteor.userId()
and dispatch an actionBut who should do the transition? I'm thinking about
replace({
pathname: '/login',
state: { nextPathname: nextState.location.pathname }
})
there are a few packages out there that connect react router and redux store, you can take a look at those and thus have the store state available to your route triggers
There are some global actions such as login, signup etc which we may need to use from different parts of an app based on the app requirements.
Therefore it may be a better idea to make that a redux action and pass it to the "dumb" auth component via the connect function.
Since that's a method call, you'll also need to implement redux-thunk!