okfn / opendataeditor

No-code application to explore and publish all kinds of data: datasets, tables, charts, maps, stories, and more. Forever free and open source project powered by open standards and generative AI.
http://opendataeditor.okfn.org
MIT License
150 stars 18 forks source link

Setup Zustand debugger #369

Closed roll closed 2 days ago

roll commented 1 month ago

Overview

Here is an example from another project (note that it might be more complex in ODE because of multiple stores):

import { create, StateCreator } from "zustand"
import { devtools } from "zustand/middleware"

export function createStore<TState>(stateCreator: StateCreator<TState>) {
  return create<TState>()(devtools(stateCreator))
}

Also, there is a new dedicated Zustand tool as well - https://medium.com/@itsnancyhuang/the-new-zustand-dev-tool-15613144b585