ambassify / react-avatar

Universal avatar makes it possible to fetch/generate an avatar based on the information you have about that user.
MIT License
643 stars 118 forks source link

UseEffect not rerendered #218

Open andrconstruction opened 4 years ago

andrconstruction commented 4 years ago

Hi, if I extract the react-avatar to an apart component it rendered only once, and not changed on a useEffect state. What this can be? I suspect that it is cached, but a cache not enabled on the react-avatar

JorgenEvens commented 3 years ago

hi @andrconstruction,

Could you provide an example that suffers from the issue you are describing on Code Sandbox?

react-avatar reacts to property changes, just like any other React component. This means that if the properties supplied to the Avatar component change, the component should as well.