You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an app where the image can update without the image_url updating, this caused an issue with useSnapshot and it would not register a change as image_url was identical to the previous one. So setting image_url would not update the image
A solution for this could be to add an option to useSnapshot, like this: useSnapshot(state, {disableOptimization:true});
Thanks for your feedback.
It's still vague, but I will probably consider changing the useSnapshot behavior in v3 and such options can be considerable. (but, as v2 isn't released yet, it's too early to consider.)
For now, I'd suggest to try use-valtio as an escape hatch.
I have an app where the image can update without the image_url updating, this caused an issue with useSnapshot and it would not register a change as image_url was identical to the previous one. So setting image_url would not update the image
A solution for this could be to add an option to useSnapshot, like this: useSnapshot(state, {disableOptimization:true});
Currently the solution I'm using is this:
thought it is very ugly and causes 10ms of "flashing"
Maybe there is another way to solve this better?
The text was updated successfully, but these errors were encountered: