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 per the documentation current update method accepts a callback function, we have some cases where we get the latest version of data entirely from the backend and we write logics like promise(body).then(res => update(() => res))
Maybe changing update method can accept both of them? update(currentData => ({ ...currentData, username: newUsername, }) update(latestData)
And usage would be more flexible. promise(body).then(update)
The text was updated successfully, but these errors were encountered:
As per the documentation current update method accepts a callback function, we have some cases where we get the latest version of data entirely from the backend and we write logics like
promise(body).then(res => update(() => res))
Maybe changing update method can accept both of them?
update(currentData => ({ ...currentData, username: newUsername, })
update(latestData)
And usage would be more flexible.
promise(body).then(update)
The text was updated successfully, but these errors were encountered: