Closed Highnesslin closed 4 years ago
import and call enableMapSet() from Immer when initializing your application.
On Wed, Jul 1, 2020 at 11:38 AM Highnesslin notifications@github.com wrote:
` const [state, setState] = useImmer({ listSet: new Set([]) });
useEffect(() => { setState(state => { state.listSet.add(activeRouteId); }); }, [activeKey]); Error: [Immer] The plugin for 'MapSet' has not been loaded into Immer. To enable the plugin, import and callenableMapSet()` when initializing your application.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/immerjs/use-immer/issues/56, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBDMBGRZTXARJFTUVIDRZMGYVANCNFSM4ONI4O6Q .
` const [state, setState] = useImmer({
listSet: new Set([])
});
useEffect(() => { setState(state => { state.listSet.add(activeRouteId); }); }, [activeKey]);
Error: [Immer] The plugin for 'MapSet' has not been loaded into Immer. To enable the plugin, import and call
enableMapSet()
when initializing your application.`