Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document correction - update ReactRouter3.md #299

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/Getting-Started/ReactRouter3.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const userIsNotAuthenticated = connectedRouterRedirect({
// This prevents us from adding the query parameter when we send the user away from the login page
allowRedirectBack: false,
// Determine if the user is authenticated or not
authenticatedSelector: state => state.user.data !== null,
authenticatedSelector: state => state.user === null,
// A nice display name for this check
wrapperDisplayName: 'UserIsNotAuthenticated'
})
Expand All @@ -86,7 +86,7 @@ When `authenticatingSelector` returns true, no redirection will be performed and
```js
const userIsAuthenticated = connectedRouterRedirect({
redirectPath: '/login',
authenticatedSelector: state => state.user.data. !== null,
authenticatedSelector: state => state.user !== null,
wrapperDisplayName: 'UserIsAuthenticated'
// Returns true if the user auth state is loading
authenticatingSelector: state => state.user.isLoading,
Expand Down