adrianhorning08 / vinyasa

Asana clone. Rails backend, React frontend.
8 stars 3 forks source link

Logging in a user #1

Closed adrianhorning08 closed 6 years ago

adrianhorning08 commented 6 years ago

Testing logging in a user via the console. The state changes, but nothing new is rendering. Trying to figure out why... I am using dispatch, and I am mapping everything (I think) correctly in the container.

adrianhorning08 commented 6 years ago

Ah, it is updating, but for some reason, the currentUser is undefined. Which means I'm not returning something? Cause in the console, it actually shows the updated state.

adrianhorning08 commented 6 years ago

I got it! I wasn't setting the key of currentUser to anything in my session_reducer. This is the change I made: newState.currentUser = action.currentUser; return merge({}, state, newState);