tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

README.md (837B)


Actions

Best Practices

Scheduling Async Actions

There are several use-cases with async actions that involve scheduling:

If you want to wait on subsequent calls you need to store action promises. [ex][req]

If you just want to cancel subsequent calls, you can keep track of a pending state in the store. [ex][state]

The advantage of adding the pending state to the store is that we can use that in the UI:

[req]: https://github.com/firefox-devtools/debugger/blob/master/src/actions/sources/loadSourceText.js [state]: https://github.com/firefox-devtools/debugger/blob/master/src/reducers/sources.js