-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Description
What docs page needs to be fixed?
https://redux.js.org/tutorials/essentials/part-4-using-data#adding-the-login-page
What is the problem?
The documentation is missing a code block showing the selector selectCurrentUsername being defined. Right now, if you read through the section Adding the Login Page, the code block for App.tsx imports selectCurrentUsername from './features/auth/authSlice'. But if you look at the most recent code block defining authSlice, there is no definition for that selector included.
What should be changed to fix the problem?
There's two options:
- Create a new code block beneath the
App.tsxcode block, showingselectCurrentUsernamebeing defined:
// features/auth/authSlice.ts
export const selectCurrentUsername = (state: RootState) => state.auth.usernameOr,
- Update the original
authSlicecodeblock to include this:
// features/auth/authSlice.ts
export const selectCurrentUsername = (state: RootState) => state.auth.usernameMetadata
Metadata
Assignees
Labels
No labels