6 ms·
>> What would you suggest instead? On the front-end, I'd do a call to the server. On the server, I'd use a database transaction for that. But I get your point
by grumpy8 7y ago
>> What would you suggest instead?
On the front-end, I'd do a call to the server.
On the server, I'd use a database transaction for that.
But I get your point. The way I deal with race condition in redux is to have a mutex. I.e. While something is being fetched, any call to this command is either ignored or queued up.
I use redux-saga for the "race-condition" and general flow, and call the various async functions from within sagas.