Answer the question
In order to leave comments, you need to log in
Why doesn't redux store Map/WeakMap?
Good afternoon, I ran into such a situation that the redux store does not store Map, WeakMap, it displays an empty object (empty) instead.
My task:
1. There is a list of houses
2. There is a history of these houses (who lived when)
I almost always need a list of houses, because it is used both in tables and on maps, etc., but the history is not needed everywhere, and because the history of the house is attached to the house itself, I decided that it would be logical to store in WeakMap<House, HouseHistory>
tk. when you delete a house from the store, its history will also be deleted.
But Redux refuses to store Map, WeakMap, displays an empty object either in the devtool or in the console, why?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question