Suppose there is an application on react, with firebase authentication connected to it with authentication. When the application starts, action SIGN_IN_REQUEST occurs, and the resulting SIGN_IN_SUCCESS or SIGN_IN_FAIL.
There are also other action's that refer to the database via componentDidMount, and which imply SIGN_IN_SUCCESS / FAIL, which has already happened. The problem is that the action takes place even before the auth api response, respectively, there is no user data yet.
In this regard, the question is, how can you wait for SIGN_IN_SUCCESS / FAIL to execute and after that dispatch other actions without connecting auth reducer to each component in order to update the component with authorization data?
- add loader? - Daniel Khoroshko
- and what it means to "actions that appeal to the base" .. the actions actually send messages to the reducers through the dispatch, but don't exactly turn to the base .. - Daniel Khoroshko
|