question about devtools #3216
-
after writing above code i get this ts error Argument of type 'StateCreator<Write<{ count: number; }, ReduxState>, [], [["zustand/devtools", never], ["zustand/persist", Write<{ count: number; }, ReduxState>], [...]]> | StateCreator<...>' is not assignable to parameter of type 'StateCreator<Write<{ count: number; }, ReduxState>, [], [["zustand/devtools", never], ["zustand/persist", Write<{ count: number; }, ReduxState>], [...]]>'. i know that you can enable/disable devtools with this option: but when you do it this way devtools are still included in the production bundle, I need to get rid of them entirely. I'm sure there is some easy way of doing this I just don't know about so I kindly ask for help here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
for posterity:
|
Beta Was this translation helpful? Give feedback.
for posterity:
process.env.NODE_ENV === "development" ? create(devtools(store)) : create(store);