Skip to content

Minimal Implementation of Zustand for state management

Notifications You must be signed in to change notification settings

rahulranjan14/zustandDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

State Management Using Zustand

This repository showcases a basic implementation of state management using Zustand, a simple and flexible state management library for React applications.

About Zustand

Zustand is an easy-to-use state management library. It keeps things simple, allowing developers of any level to handle global state without any complications and has very gentle learning curve.

To learn more about Zustand and its features, visit the Zustand documentation.

Project Overview

This project consists of a single-page interface with three main components:

  1. Items Section: Displays a list of items with buttons to add them to either the cart or wishlist.

  2. Cart Section: Shows items added to the cart, with options to remove individual items or clear the entire cart.

  3. Wishlist Section: Displays items added to the wishlist, with options to remove individual items.

The state management and logic for handling items in the cart and wishlist are implemented using Zustand.

Getting Started

To explore this project:

  1. Clone the repository to your local machine.
  2. Install dependencies by running npm install.
  3. Start the development server with npm run dev.
  4. Open your browser and navigate to the prompted port to view the application.

Project Comparison

This same project with same functionalities are implemented using other state management libraries like Redux-Toolkit and Recoil. You can find the Redux Toolkit and Recoil versions for comparison:

Contributing

If you have any suggestions for improvements, feel free to reach out to me.

If you find this project helpful, consider giving it a star.

About

Minimal Implementation of Zustand for state management

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published