Is your feature request related to a problem? Please describe.
React Context DevTool does not properly handle rending state javascript Map objects.
In this example, I assign the id of the payload to the Map key.
In the state view, it renders as:
"Map [855c35fb-ae5a-43da-93fa-1e2ddab28d88,[object Object]]"
However, when viewing the action sent, it displays as:
{
"type":string"ADD_ACTION"
"payload": {
"id":string"855c35fb-ae5a-43da-93fa-1e2ddab28d88"
"slug":string"some-action"
}
}
I am setting the context state as:
[ActionTypes.ADD_ACTION]: (state: TActionState, payload: TActionPayload) => {
const tempMap = state.actionListeners;
tempMap.set(payload.id, payload);
return {
...state,
eventListeners: tempMap
};
},
I am able to access the content as expected, and the Map is stored correctly in the context state.
Describe the solution you'd like
When displaying a map in the state view, I'd expect to be able to twirl down the object and see its contents, like I can when viewing the action.
Screenshots
State:
![image](https://user-images.githubusercontent.com/3649828/113624060-2d249900-962d-11eb-9443-195726f02fe5.png)
Action:
![image](https://user-images.githubusercontent.com/3649828/113624089-344ba700-962d-11eb-815c-9c5b78c17d10.png)