Closed travisk-codes closed 4 years ago
Probably a local storage issue, if I were to guess. It doesn’t necessarily pick up changes to it immediately and often requires a refresh
Looks like all other avatar locations are loaded on didMount
(update makes sense when navigating to a new page) or are updated via setState
, which makes sense for the immediate update on You.tsx
. Does it make sense to lift state up into AppLayout
? Doesn't seem like the correct concern. are localStorage
updates made everywhere immediately?
I don't think localStorage
loads immediately, hence why some places require that we refresh the browser. It's also a bit tricky tying AppLayout
with the pages since they're in separate locations, in addition to it being "higher" up in the tree.
Do you think account info would be a good use case for React context? Or would context be a good solution here?
Perhaps. I'm a little unfamiliar with it, but it's worth a try.
Describe the bug If you change your avatar, it appears to update (without refresh) everywhere except for the header, which updates upon refresh.
To Reproduce Steps to reproduce the behavior:
Expected behavior The App Header to update along with everything else
Screenshots
App Information (please complete the following information):
Additional context Minor, low-pri