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
Hello people,
I am currently building a web app for a company and I have a lot of cases where i fetch a list of objects and have separate api routes to fetch one of the objects. My question is on how to best mutate the cache and keep the code as lean as possible. This is my current approach:
My endpoint currently does not return the created/mutated object so I set populateCache to false.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello people,
I am currently building a web app for a company and I have a lot of cases where i fetch a list of objects and have separate api routes to fetch one of the objects. My question is on how to best mutate the cache and keep the code as lean as possible. This is my current approach:
My endpoint currently does not return the created/mutated object so I set populateCache to false.
Here is an example of the list of objects:
And this is the function which fetches one object:
Beta Was this translation helpful? Give feedback.
All reactions