React Query tutorial 1: Query Devtools and hooks

preview_player
Показать описание
In this comprehensive React Query tutorial, you'll learn how to effortlessly manage data fetching using Query Dev Tools and React Hooks Whether you're a beginner or an experienced developer, this tutorial will equip you with the knowledge and skills to streamline your data fetching workflow using React Query's intuitive tools and the flexibility of React Hooks.

#reactcairo #reactqurey #querydevtools #reactqueryhook #reactquerytutorial
Рекомендации по теме
Комментарии
Автор

invalidate: mark all the queries with that query key as stale and only fetches if the used queries on screen right now
refetch: mark all queries with that query key as stale and fetches all the queries even if they are not used

example: if we are in a page A that have a query to fetch animals with queryKey "Animals", then navigated to page B which are not using animals query
if we triggered queryClient.invalidateQuery, that will mark "Animals" as stale and will only fetch animals if you navigated to page A
if we triggered queryClient.refetchQueries that will mark "Animals" as stale and fetches them while we are in Page B

MahmoudMAnwar