I would like to open a Dialog or Modal if I get a status 401 in AUTH_ERROR. What is the best way to implement this.
Thanks!
I would like to open a Dialog or Modal if I get a status 401 in AUTH_ERROR. What is the best way to implement this.
Thanks!
You'll have to take the custom app route:
Follow the documentation to bootstrap your custom app.
Add a saga which should take the latest (
takeLatest
in redux-saga)FETCH_ERROR
action. This action has anerror
property. The saga should then dispatch (put
in redux-saga) a custom action which will be used by a reducer you'll add.This reducer should contain the data required for the modal: at least a boolean determining whether to show it or not.
Finally, update your custom app by adding it a custom redux connected component which will check if it has to show your modal.