For further actions, you may consider blocking this person and/or reporting abuse
Read next
Top 5 Containerization Tools You Should Know in 2024 for DevOps Success
Fazly Fathhy -
Evaluating Medical Retrieval-Augmented Generation (RAG) with NVIDIA AI Endpoints and Ragas
KAMAL KISHOR -
🌟 Introducing the My 3D Model Viewer! 🌟
Alberts Kresi -
Tricentis Tosca: A Powerful Tool for Continuous Testing
Tharunika L -
Top comments (8)
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.
Thanks Gabriel, that article looks really good!
I'm not sure where the term came from, but it appears to be nothing more than a function that you return from another function, e.g:
This appears to be used in redux and they call it a 'thunk'. It's a piece of logic you can run at some later time rather than right away.
I found an article introducing the use of 'thunks' in redux.
Very helpful, thanks!
TIL "thunk" is an actual programming word.
Now I sit here and wait for answers. 😁
Same, first time I hear about it :-O
From Wikipedia:
thunk is a function that encapsulates some other function .