Enable immer mapSet? How can I use a Map()?
jibees opened this issue · comments
jibees commented
Hello
I'm wondering if there is any opportunity to enableMapSet for pullstate
?
I try to update my store state and cannot because of
[Immer] The plugin for 'MapSet' has not been loaded into Immer. To enable the plugin, import and call `enableMapSet()` when initializing your application.
More generally, I just wanted to use a Map()
object in my store.
Any idea?
Paul Myburgh commented
Hi there,
Did you try running enableMapSet()
at the top of your code, before the rest of your application / Pullstate mounts? Generally that's the way to add immer features.
jibees commented
I tried, but not at the top of the code (before the rest of your application).
I should have another try thus ;)
Thanks! 🙏