Redux - Garasje-folka/bartstua GitHub Wiki
Structure
The structure can also be viewed live with Redux Dev Tools (Chrome, Firefox).
Example
currentUser: {
data: null,
status: {
loaded: true,
lastUpdated: '2021-06-17T20:19:12.869Z'
}
}
Selectors
currentUserSelector
This selector will always return the currently signed in user. If the user is not signed in, it will return null. The user will be returned with the predefined User type.
Actions
authChanged
Takes in a user-object or null and updates the global state for currentUser.