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

Fix row expansion erroring out in v2.0-beta #613

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

pradeepnschrodinger
Copy link
Collaborator

Description

In the beta branch, trying to trigger a row expansion makes redux-toolkit throw an hard error.
The propsChange reducer was mutating state AND returning a new state object.
This is unsupported in immer, and the fix is to either only mutate the state, or only return a new state object.

I went ahead with mutation as it's much easier on the developer.

How Has This Been Tested?

Tested the examples, specifically the row expansion example.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

The propsChange reducer was mutating state AND returning a new state object.
This is unsupported in immer, and the fix is to only either mutate or
only return the new state.

I went ahead with mutation as it's much easier on the developer.
@pradeepnschrodinger pradeepnschrodinger added the v2.0-beta Tickets targeting the v2.0-beta branch. label Nov 17, 2021
@pradeepnschrodinger pradeepnschrodinger changed the base branch from v2.0-beta-merge-master-T3 to v2.0-beta November 29, 2021 04:24
@pradeepnschrodinger pradeepnschrodinger merged commit 7ce08d2 into v2.0-beta Nov 29, 2021
@pradeepnschrodinger pradeepnschrodinger deleted the v2.0-beta-fix-rowExpansion branch June 29, 2022 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.0-beta Tickets targeting the v2.0-beta branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants