MarchosiasM / irlgamers

MIT License
0 stars 3 forks source link

Fixed state issues with user type/state #86

Closed dimstar closed 6 years ago

dimstar commented 6 years ago

We were not making use of selector pattern for member/host/logged in user statuses. We were setting local state with this.setState() which is only ok when dealing with component state that doesn't need to persist past a page refresh.

dimstar commented 6 years ago

@rperez2021 & @MarchosiasM I wanted you guys to checkout what I did with state here. essetnially while hacking out the chat feature I found that we were abusing setState a little.

Let me know what you guys think or if there are any issues with the PR. thanks!

I would also encourage everyone to check these out... redux & setState() hackernoon: selector pattern