TryCatchLearn / Reactivities_2.2

Repository for Reactivities training course using .Net Core, React (with Typescript), Mobx. .Net Core 2.2 version
180 stars 74 forks source link

userstore.user values coming undefined in my reactivities Project #4

Open jags212 opened 4 years ago

jags212 commented 4 years ago

React_3 React_2 React_1

Hello Neil

Please refer below images for References. this.rootstore.userstore.user value is coming undefined.

jags212 commented 4 years ago

@TryCatchLearn please have a look into it

davydovvy commented 4 years ago

Had the same problem just 10 minutes ago. It turned out that in my UserController in the API Username had uppercase N in it, so getUser didn't really work in userStore.ts. Try checking that properties in CurrentUser.cs are exactly DisplayName, Username, Token and Image. It's all about camelcasing.