Our great sponsors
-
react-query
Discontinued 🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
So if your state consists of response data cached from network requests, you'd use a data fetching library like react-query which would handle the lifecycle and state management of your API calls.
If you need to share some state between multiple components that may not be close in the tree, then a shared-state solution like zustand is a good idea.