Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redux DevTools does not display content of Map objects in Angular #1804

Open
sarihuminer opened this issue Dec 18, 2024 · 1 comment
Open

Comments

@sarihuminer
Copy link

It appears that Redux DevTools does not correctly display the contents of Map objects in an Angular application. When viewing the store state in the DevTools, Map objects appear as empty or do not show their key-value pairs.

Steps to Reproduce:

Create an Angular application with Redux/NgRx and Redux DevTools enabled.
Add a property of type Map<number, string[]> to the store state, for example:
typescript

const initialState = { ids: new Map<number, string[]>([[4, ['111111111111']]]) };

Update the state using an action.
Open Redux DevTools and inspect the state.

the state look null,but itsnot right!

Expected Behavior:
The Map should display its key-value pairs, like:

ids: Map(1) { 4 => ['111111111111'] }

@Methuselah96
Copy link
Member

You need to turn on the serialize option to see Map previews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants