Skip to content

PacktPublishing/State-management-with-React-Query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

State Management with React Query

State Management with React Query, published by Packt

State Management with React Query

This is the code repository for State Management with React Query, published by Packt.

Improve developer and user experience by mastering server state in React

What is this book about?

The book is for React developers who want to improve their state management skills and overcome the hurdles brought about by server state while improving their developer and user experience. Basic knowledge of web development and React will assist with understanding key concepts covered in this book. JavaScript developers will also find it useful.

This book covers the following exciting features:

  • Get to grips with state and how it's typically managed
  • Install and configure React Query and its Devtools
  • Manage server state data fetching with the useQuery hook
  • Create, update, and delete data using the useMutation hook
  • Employ React Query in combination with frameworks such as Next.js and Remix
  • Explore MSW and the testing library to test React Query using components

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, chapter1.

The code will look like the following:

const App = () => {
...
return (
<div className="App">
  <div>Counter: {count}</div>
  <div>
    <button onClick={increment}>+1</button>
    <button onClick={decrement}>-1</button>
    <button onClick={reset}>Reset</button>
  </div>
</div>

Following is what you need for this book:

State management, a crucial aspect of the React ecosystem, has gained significant attention in recent times. While React offers various libraries and tools to handle state, each with different approaches and perspectives, one thing is clear: state management solutions for handling client state are not optimized for dealing with server state. React Query was created to address this issue of managing your server state, and this guide will equip you with the knowledge and skills needed to effectively use React Query for state management.

With the following software and hardware list you can run all code files present in the book (Chapter 1-9).

Software and Hardware List

Software required OS required
Yarn Windows, macOS, or Linux
pnpm Windows, macOS, or Linux
npm Windows, macOS, or Linux
JavaScript Windows, macOS, or Linux
React 16.8 Windows, macOS, or Linux
Remix Windows, macOS, or Linux
Next.js Windows, macOS, or Linux
Mock Service Worker Windows, macOS, or Linux
TanStack Query Windows, macOS, or Linux

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Related products

Get to Know the Author

Daniel Afonso is a developer advocate with a full-stack background, having worked with different languages and frameworks on various projects, from IoT to fraud detection. He is passionate about learning and teaching and has spoken at multiple conferences related to React, JavaScript, and testing. In his free time, when he’s not learning new technologies or writing about them, he’s probably reading comics or watching superhero movies and shows.

About

State management with React Query, published by Packt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published