- Understanding of component state
- Difficult code maintainability due to lack of standardization
- Repeated code
- Side effects
- Amount of setup time for developers
- Very specific components to each pages
React Query is a server-state** library, responsible for managing asynchronous operations between your server and client
Redux, MobX are client-state libraries that can be used to store asynchronous data, albeit inefficiently when compared to a tool like React Query
With those points in mind, the short answer is that React Query replaces the boilerplate code and related wiring used to manage cache data in your client-state and replaces it with just a few lines of code.
With a few hook calls to useQuery and useMutation, we also get to remove any boilerplate code that use to manage our server state eg.
Understanding these misconceptions about distributed systems like microservices, SOA, and others will help you build better, more flexible software architecture.
Are you working on a distributed system? Microservices, Web APIs, SOA, web server, application server, database server, cache server, load balancer - if these describe components in your system's design, then the answer is yes. Distributed systems are comprised of many computers that coordinate to achieve a common goal.
More than 20 years ago Peter Deutsch and James Gosling defined the 8 fallacies of distributed computing. These are false assumptions that many developers make about distributed systems. These are usually proven wrong in the long run, leading to hard to fix bugs.
The 8 fallacies are:
Vector Clocks are used in a distributed systems to determine whether pairs of events are causally related. Using Vector Clocks, timestamps are generated for each event in the system, and their causal relationship is determined by comparing those timestamps.
- Use in key-value store like riak, Dynamo
- Enables causality to be captured
- With vector clocks, we assume we know about each participating process
- Suppose there are N processes in the group [1…N]