Skip to main content

waitForAllSettled(dependencies)

A concurrency helper that returns a set of Loadables for the current state of the requested dependencies. It waits until at least all of the dependencies are either in a value state, or an error state.

The dependencies may either be provided as a tuple array or as named dependencies in an object.


function waitForAllSettled(dependencies: Array<RecoilValue<>>):
RecoilValueReadOnly<UnwrappedArrayOfLoadables>
function waitForAllSettled(dependencies: {[string]: RecoilValue<>}):
RecoilValueReadOnly<UnwrappedObjectOfLoadables>

waitForAllSettled() is similar to waitForNone(), except that it waits while any of the dependencies are in a loading state.