Howdy everyone, In this article,I will show how I removed redux from my project and managed state with Apollo Version .
I will try to show u just the difference between *redux vs apollo *, for design check the first post.
For the project with state managed with Redux check my previous post.
link here: https://dev.to/aom19/new-project-3afh
Project Repository: https://github.com/aom19/rentCar/tree/main/apollo-version
Apollo Version 3
Apollo Client is a comprehensive state management library for JavaScript that enables you to manage both local and remote data with GraphQL. Use it to fetch, cache, and modify application data, all while automatically updating your UI.
Project Structure
Frontend
2.Initialize ApolloClient
3.Create Mutations and Queries
4.Import useQuery & useMutation
5.Simplest way to use a Mutation.
but this type of mutation won't provide immediately changes on the screen , it will just store that car booked.
for this one, I start update the cache directly rewriting this .
Top comments (0)