Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Christopher Parke
Christopher Parke
21,978 Points

Maybe it's just me.

Maybe it's just me -- But this react-redux course felt like "cut this, paste it here. Cut that paste it there. Ok now build an application from scratch."

I just don't see how we go from cutting and pasting to writing such custom code in this project. Seemed like the intellectual leap was 10' vertical. Even with the step by step instructions I had no clue what was being asked of me.

EG.

" switch(action.type) { case PlayerActionTypes.ADD_PLAYER: return [ ...state, { name: action.name, score: 0 } ]; "

was supposed to become

" case PlayerActionTypes.ADD_PLAYER: { const addPlayerList = [...state.players, { name: action.name, score: 0, created: ${month}/${day}/${year} }];

  return {
    ...state,
    players: addPlayerList
  };
}

"

From the instruction "In the UPDATE_PLAYER_SCORE switch case, set the player's updated value to the current date"

Like -- what?

First of all, what's an "updated value". Are we talking about score or name? Oh, we're creating some new value called created? That wasn't in the steps...OK, we'll do that.

Wait, how come we need a const inside one of the cases? I don't understand this code and we didn't write anything like this up until this point. Well I guess I'll just copy and paste again. Great course on how to use CTRL+C, CTRL+V. Super worth...