Closed vegancat closed 1 year ago
Version 1.3.5 includes a CommonJS build, see if that fixes your issue. It was built initially for ES Module projects.
Also, for the README. Are you talking about the selectors example? Since I'm not inferring the mutator type and am typing it explicitly (e.g. [["chrisvander/zustand-computed", ComputedStore]]
) I don't need to use the curried create()
call.
Aha, I tried a few approaches to solve the error and all didn't work. give it a shot, if it worked then it has to be something by my side.
and for readme, I didn't know you need to add ()
to the create
only if you're not typing the function explicitly.
There's a similar library zustand-middleware-computed-state
that works fine for me
Did you try the CommonJS build?
Closing as this should be addressed.
I'm not using anything fancy, just zustand + this package and running
yarn dev
produces error below:Also there's a typo in readme.
create<Type>()(computed(...))
seems to be correct as it used in the example.()
in front ofcreate
is missing