thunks

In notebook:
FrontEndMasters Async Javascript
Created at:
2016-09-07
Updated:
2016-09-07
Tags:
Fundamentals JavaScript
a solution based on  callbacks

thunk: a function with a closured state, so that it needs no more parameters in order to run and give you back the result

so it becomes a wrapper around the state that i can pass around

async thunk: you have to pass in a callback to get your value back

yes, it's like a promise