⚠ Since version 6 support for
Sets has to be enabled explicitly by calling
enableMapSet() once when starting your application.
Plain objects, arrays,
Sets are always drafted by Immer. An example of using Maps with immer:
Maps and Sets that are produced by Immer will be made artificially immutable. This means that they will throw an exception when trying mutative methods like
clear etc. outside a producer.
Note: The keys of a map are never drafted! This is done to avoid confusing semantics and keep keys always referentially equal