zustand icon indicating copy to clipboard operation
zustand copied to clipboard

Support all devtools features

Open devanshj opened this issue 3 years ago • 5 comments

Redux devtools has many more features that we have not implemented yet. For example this tracing feature. The full list of features is here. This will require looking into the (actual) redux's middleware/enhancer's source to see what needs to be done to have these features (and if we can even have them in zustand or not).

Putting it out there in case someone's interested, I might look into it when I have time.


  • [ ] #926

devanshj avatar Dec 17 '21 01:12 devanshj

It feels like we should focus on v4 and work on this after that, unless this introduces any breaking changes. That said, in the meantime, I'm more interested in this for valtio's devtools and jotai's useAtomDevtools.

dai-shi avatar Dec 17 '21 09:12 dai-shi

The trace property seems to be mostly working already, just that Zustand isn't typed to accept it. I've put up a PR to allow the trace option to be passed.

I have noticed one problem with this, where a callback passed in for trace will not receive the action as an argument. I'll look into that and address it in a future PR. But for now, just allowing the option to be passed gets us much of the value.

DanielPower avatar Jan 13 '22 03:01 DanielPower

We tried supporting the trace feature in https://github.com/pmndrs/valtio/issues/331 (PR: https://github.com/pmndrs/valtio/pull/380) but as mentioned, there's an issue in redux devtools trace API (https://github.com/reduxjs/redux-devtools/issues/1100), so I guess we can ignore the trace feature for now if possible, and work again on it in case the trace API works again.

Aslemammad avatar Apr 29 '22 06:04 Aslemammad

#926 is related, right?

dai-shi avatar Jul 26 '22 01:07 dai-shi

The trace feature is really great for debugging, I would to see it available 🙂

Hideman85 avatar Oct 27 '22 10:10 Hideman85

Closing this as not actionable. #1200 covers all configs (and #1991 is a better fix). The trace feature would be nice, but it's blocking. Let's create a new issue once https://github.com/reduxjs/redux-devtools/pull/1369 is published.

If there are other features to support, please open a new discussion.

dai-shi avatar Aug 12 '23 06:08 dai-shi