npm.io
1.0.1 • Published 6 years ago

await-state

Licence
MIT
Version
1.0.1
Deps
0
Size
1 kB
Vulns
0
Weekly
0

await-state

await a desired redux state

Usage

import awaitState from 'await-state'

// resolves immediately if the condition is already true
// or later, whenever it becomes true
await awaitState(store, booleanReturningSelector) // e.g. (state) => state.matrix.isLoaded

// the condition booleanReturningSelector is true!