'Edit state variables in React devtools when using a Zustand store

In React devtools you can easily edit and toggle state variables - either stored locally, in Context, or with some fancy add-ons like redux devtools.

Is there a way to do that with Zustand store hooks? It seems to me like they're just readonly.

Zustand hooks/vars



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source