Ok, I\'m fed up trying. The onEnter method doesn\'t work. Any idea why is that?
onEnter
// Authentication \"before\" filter function requireAuth(ne
onEnter no longer exists on react-router-4. You should use to get your desired functionality. I believe Redirect example has your specific scenario. I modified it below to match yours.
react-router-4
( isLoggedIn() ? ( ) : ( ) )}/>