Details
Details
Call this code:
void dispatchActionPromise( createUserKeysBackupActionTypes, createUserKeysBackup(), );
and check if it worked
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/actions/backup-actions.js | ||
---|---|---|
4–6 ↗ | (On Diff #46084) | Are you sure we need to use the dispatchActionPromise? Why a single action won't suffice? |
lib/reducers/backup-reducer.js | ||
16 ↗ | (On Diff #46084) | The reducer should be pure - in this case, every time it is called, the result will be different. The correct way to solve this issue is to generate the timestamp and put it into action. |
lib/actions/backup-actions.js | ||
---|---|---|
4–6 ↗ | (On Diff #46084) | It will, but I recall receiving feedback in the past that doing something like: await promise(); dispatch({}); is an antipattern, and whenever having a promise, we should aim to use dispatchActionPromise even if .started and .failed actions are not used. |