Zustand  demo

Create a store that is state-machine like, with all the functions to manipulate it included. Individual parts of this can be accessed individually, and only componnets that use it will re-render when it changes. E.g. counter below

Counter : 0

Shopping List

  • apple : 1
  • pairs : 3

Finished

    Actually something dynamic like a shopping list with a dynamic list of items is not the best example for this. The list counts as one zustand item and everything that uses the list re-renders anyway