State Package
The State package is a collection of state management utilities for the Phoenix Frontend project. It utilizes Zustand, a powerful library for managing and caching asynchronous data.
Installation
To install the State package, follow these steps:
- Ensure that you have Node.js and yarn installed on your machine.
- Navigate to the root directory of the Phoenix Frontend project.
- Run
yarn install
to install all project dependencies. - Navigate to the
/packages/state
directory.
Usage
To use the State package in your application, follow these steps:
- Import the desired state providers from the State package into your project.
- Wrap your components with the imported state providers to access the provided state management functionalities.
- Utilize the available hooks and utilities provided by React Query to manage and interact with the application's state.
- Customize the state management as needed, utilizing the options and configurations available in React Query and the State package.