JS Party JS Party #60

You might want to read up on PAW Patrol

Your 3 intrepid hosts try to explain JS concepts (bind/apply, thunks, and ReasonML) to each other as if we’re five year olds. Hilarity and/or confusion ensues. During Pro Tip Time, Suz tells a story of woe, KBall motivates himself, and Jerod tries to keep you in the flow. Finally, we point our project spotlight at Fly CDN and talk edge applications and IoT.


Sign in or Join to comment or subscribe

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.

Player art
  0:00 / 0:00