set.getState is not a function in React while trying to use Zustand
I am new to react and states. I am trying to use Zustand to manage my global states. I created a store where I have three function, fetchTodos, where I fetch my data from a Json file (my data is an array of objects, id, title and completed). The second function is called handleAddItem, where I am trying to update the state of my array so I can add a new item to said array. The third function is handleToggleCompleted, this function helps me toggle a checkbox field depending on the value of completed. The error I am getting is “set.getState is not a function” whenever I try to add a new item.