A
A
alex4answ2020-12-21 11:18:21
redux
alex4answ, 2020-12-21 11:18:21

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

1 answer(s)
A
alex4answ, 2020-12-21
@alex4answ

Stores, I made a mistake, but does not display in devtools (writes empty)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question