await a desired redux state
import awaitState from 'await-state'
const isLoadedSelector = (state) => state.matrix.isLoaded
// resolves immediately if the condition is already true
// or later, whenever it becomes true
await awaitState(store, isLoadedSelector)
// state.matrix.isLoaded is true!awaitState(store, selector)
storeis a Redux storeselectoris a Redux selector that returns a boolean value
Returns a Promise that resolves when selector returns true