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
As I learned in #2360 (comment), the object returned by useMutation is not referentially stable — it is remade on every render. But I thought it was, so we're using it in a lot of dependency arrays. We basically need to go through every useApiMutation call and check if the mutation is being included in a dependency array, and change it to depend directly on the relevant property instead, like the mutate function (which is stable). Unfortunately I can't think of a way to lint this, so we'll just have to try to do it as goodly as we can.
As I learned in #2360 (comment), the object returned by
useMutation
is not referentially stable — it is remade on every render. But I thought it was, so we're using it in a lot of dependency arrays. We basically need to go through everyuseApiMutation
call and check if the mutation is being included in a dependency array, and change it to depend directly on the relevant property instead, like themutate
function (which is stable). Unfortunately I can't think of a way to lint this, so we'll just have to try to do it as goodly as we can.console/app/pages/system/SiloImagesPage.tsx
Lines 73 to 95 in 3a6f815
The text was updated successfully, but these errors were encountered: