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.tsx code block, showing selectCurrentUsername being defined:
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 forApp.tsx
importsselectCurrentUsername
from'./features/auth/authSlice'
. But if you look at the most recent code block definingauthSlice
, there is no definition for that selector included.What should be changed to fix the problem?
There's two options:
App.tsx
code block, showingselectCurrentUsername
being defined:Or,
authSlice
codeblock to include this: