Discussion

Sign in or join to comment

2019-01-25T17:42:36Z ago

Hey all! Just wanted to share that thunks have more history than just what we know in redux-thunk. Traditionally, “Thunks are primarily used to delay a calculation until its result is needed, or to insert operations at the beginning or end of the other subroutine.” So it can be thought of as “delaying” the reducer call in order to insert other operations before calculating the new state.

2019-01-28T20:19:45Z ago

One great note (and possibly it’s coolest feature) about bind that was missed in KBall’s (amazing and hilarious) explanation was that it can be leveraged to partially apply arguments.

The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.

0:00 / 0:00