Skip to content

Function: createSelectorAsync()

createSelectorAsync<T, U>(selectors, projection?): (props?) => (state) => Promise<undefined | U>

Defined in: selectors.ts:107

Similar to createSelector but supports asynchronous selector functions.

Type Parameters

T

T = any

Slice type extracted from state.

U

U = any

Final return type after projection.

Parameters

selectors

A selector or array of selectors returning a value, Promise, or Observable-like.

SelectorFunction | SelectorFunction[]

projection?

ProjectionFunction

Optional function to project intermediate values into a final result.

Returns

A selector that returns a Promise of a derived value from the state.

(props?): (state) => Promise<undefined | U>

Parameters

props?

any

Returns

(state): Promise<undefined | U>

Parameters

state

T

Returns

Promise<undefined | U>

Released under the MIT License.