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
{{ message }}
This repository has been archived by the owner on May 26, 2023. It is now read-only.
A good real world 'use case' would be a shopping cart. below is a typical result object for a shopping cart.
The goal here is to set a local variable called "user_selected_qantity" with the shopping cart remote data. and initialize a default value for it. here user should be able to increment and decrement "user_selected_qantity" for the given product. becuase evertime a user increments qty for the product it should not have to go to the server right. I hope i'm explaining this correctly
1- putting the data in to the component "state" and manipulating it.
2- putting the data in to "Redux or other state management library" and manipulate it.
By doing so. aren't we not duplicating the data? one in the redux and one in the cache. should I have to update both?
I was hoping to know the best practice for this use-case using ApolloV3 stuff.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
A good real world 'use case' would be a shopping cart. below is a typical result object for a shopping cart.
The goal here is to set a local variable called "user_selected_qantity" with the shopping cart remote data. and initialize a default value for it. here user should be able to increment and decrement "user_selected_qantity" for the given product. becuase evertime a user increments qty for the product it should not have to go to the server right. I hope i'm explaining this correctly
This can be achieved seamlessly using two ways.
1- putting the data in to the component "state" and manipulating it.
2- putting the data in to "Redux or other state management library" and manipulate it.
By doing so. aren't we not duplicating the data? one in the redux and one in the cache. should I have to update both?
I was hoping to know the best practice for this use-case using ApolloV3 stuff.
The text was updated successfully, but these errors were encountered: