How to Optimize React-query web app Performance

How to Optimize React-query web app Performance

If you’re building a web application that relies on slow, remote data sources, optimizing performance can be a challenge. Luckily, React-Query provides a powerful solution to this…

Testing React-Query with Jest and React-testing-library

Testing React-Query with Jest and React-testing-library

Introduction In this article we will cover the basic usage of testing useQuery hook from tanstack/react-query library, along with how to test it using jest and react-testing-library….

The basic guide for React Query useMutation hook

The basic guide for React Query useMutation hook

React Query is a popular library for fetching, caching, and updating asynchronous data in React applications. It provides a number of hooks, including useMutation that allows you…

Submit formik form using React-Query mutations

Submit formik form using React-Query mutations

In this article you will learn how to create forms using Formik library, and how to submit the forms using React-Query mutation hook. We will cover the…

Found multiple elements error in React Testing Library

Found multiple elements error in React Testing Library

Introduction While working with React-Testing-Library to test UI components, you might encounter an error like the following: HTML Structure: Here’s an example of the HTML structure that…

How to invalidate query after mutations in React-Query

How to invalidate query after mutations in React-Query

Introduction Query invalidation is an essential part while working with React-Query. Usually, when there is a mutation in the app, there are queries related, and when a…

How to handle multiple queries with React-Query

How to handle multiple queries with React-Query

A super cool feature of React Query is that we can execute multiple queries in the same component, whether these queries are dependent or independent of each…

react-query-auto-pull

How to auto-pull data in React-Query

Introduction React-Query is a powerful tool for fetching/caching the data on the frontend side, yet working with React-Query might be a bit not straightforward, in this article…

react-query-fetch-options

React-Query: How to fetch queries conditionally

Introduction React-Query is a powerful tool for fetching/caching the data on the frontend side, in this article we’re going to demonstrate how we can fetch the queries…