lib / com.willowtreeapps.common.external / createThunk

createThunk

fun <State> createThunk(thunkLambda: (<ERROR CLASS>, <ERROR CLASS><State>, extraArgument: Any?) -> Any): Thunk<State>

Convenience function for creating thunks. Usage: val myThunk = createThunk { dispatch, getState, extraArgument -> //do async stuff dispatch(NewAction()) }

    ....

    store.dispatch(myThunk)

DEV NOTE: This will not be needed if/when typealias for Thunk works with K/N