aboutblognotesprojectsresearch

More posts

React Query

15 December 2020 (5 months ago)🏷️ #javascript🏷️ #react🏷️ #webapi🏷️ #technology

If you write React web apps that interface with a backend web API then definitely consider trying React Query.

The library makes use of modern React patterns, such as hooks, to keep code concise and readable. It probably means you can keep API calls directly inside your normal component code rather than setting-up your own client-side API interface modules.

React Query will also cache resolved data through unique "query keys", so you can keep transitions in UIs fast with cached data without needing to rely on redux.

You'll still need to write the actual requests yourself (e.g. using fetch or axios) but using this certainly takes away a lot of the pain in building smooth asynchronous web apps.

To try it out install it with your usual Node package manager and begin with the quick start guide.

📲 Enjoyed this article? Subscribe to updates!

If you would like to read more posts like this, then you can subscribe via RSS.

Subscribe to an RSS feed