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

Sets aren't properly diffed or displayed #452

Open
chrisjpatty opened this issue Jan 30, 2018 · 1 comment
Open

Sets aren't properly diffed or displayed #452

chrisjpatty opened this issue Jan 30, 2018 · 1 comment

Comments

@chrisjpatty
Copy link

Just wanted to make you aware of a possible bug. When passing a new set as a key of the initial state:

{
  items: new Set()
}

and then later adding to the set like so:

const newItems = new Set(state.items)
newItems.add("newItem")
return {...state, items: newItems}

the redux devtools evaluates the diff as no change, while logging the state shows that an item was added.

Let me know if you want any more details about this bug. I have a workaround that I'm using to log the items when needed, but thought you might want to know.

@zalmoxisus
Copy link
Owner

If someone wants to investigate this, it should be implemented in jsondiffpatch. Not sure of there're plans for ES6 support there.

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

No branches or pull requests

2 participants