DEV Community

Discussion on: Explain Thunks in JavaScript Like I'm Five

Collapse
 
glebec profile image
Gabriel Lebec

You may be interested in my article Thunks in Redux: the Basics.

@nestedsoftware : an unevaluated function body is one way to have a thunk in JS, but the concept of a thunk is more general than that. In essence, a thunk is a piece of unevaluated (i.e. lazy) code, which can optionally be evaluated as needed if it turns out the result is going to be used.

Collapse
 
nestedsoftware profile image
Nested Software

Thanks Gabriel, that article looks really good!