What the THUNK? Using and understanding Thunk in your React/Redux app.

me: 14 months ago (mentally)
export const addToCollection = (item) => ({type: ADD_COLLECT, payload: item})
export const itemReducer = (state = INITIAL_STATE, action) => {
switch(action.type) {
case ADD_COLLECT:
return {...state, myCollection:
[...state.myCollection, action.payload]}
We want the Thunk. We gotta have that Thunk, now.
now to render all my Games…..
voila

--

--

--

Current Software Engineer student at Flatiron School, 11 year Math Teacher, 20 year thespian.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Learning React with Ben Awad — 10

A Complete Guide to Angular Modules

How to Blur Faces in Photos Using React

Understanding how virtual DOM works in React

A misconception about Angular life-cycle methods

More Good news about reBaked Project as you await the Official Launching.

Rain, No sleep, or Shine #201

Advanced Level for Angular Reactive Form

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ryan Bollettino

Ryan Bollettino

Current Software Engineer student at Flatiron School, 11 year Math Teacher, 20 year thespian.

More from Medium

5 Ways to Make Money Using Your Computer in 2022

Universal Theories Web Community

Get Paid To Review Apps On Your Phone

Project #5