Closed NicoPlyley closed 3 years ago
No, it doesn't work like that, just now I saw.
@basir ,can close this issue!
I made it without the reset and it works perfectly fine as expected.
the only place that we use USER_LIST_RESET is on logout: https://github.com/bradtraversy/proshop_mern/blob/master/frontend/src/actions/userActions.js#L73
The USER_LIST_RESET is not needed. On the UserListScreen.js there is a useEffect that checks the state of userList. When it changes it will send you to the login screen, therefore an action does not have to be set at logout to clear the state of the user list.