February 2019
Intermediate to advanced
204 pages
4h 52m
English
Once we get the response from the API, we will show the information in the UI. To do so, we need to get a subset of the state from the store. And how do we do that? Well, we have already discussed that in Chapter 5, React with Redux, using selectors. Now, let's get the selectors to get an authenticated user and show a welcome message on the screen.
Create a selector file inside app/containers/App/selectors.js. There is a reason why we are keeping the selector file in the App container and not inside the Login container. This is so we can detect whether a user is logged in or not before sending the user to the login page or dashboard. We are going to use the same selector for both the App and ...
Read now
Unlock full access