Closed cinnabarcaracal closed 5 years ago
This has to do with being based around immer
. Since the conversion to createDraft
/finishDraft
in v3.0.0
and the work done in #7 it should be easier to support primitive state.
Published 3.1.1
with support for primitive state. Thanks for the report!
It's entirely possible that I'm just not understanding some part of the API, but I think there is an issue with the action handler working on a falsey current state (e.g.
null
orfalse
). I think it might be the logic that returns the initial/default state when the current state isundefined
being a little over eager.e.g.
If you think this could be a bug too, I would be happy to submit a pull request.