immerjs / immer

Create the next immutable state by mutating the current one

Home Page:https://immerjs.github.io/immer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

On value set scenario, copy_ can be null

timtong1982 opened this issue Β· comments

πŸ› Bug Report

A clear and concise description of what the bug is.

If your bug report involves classes, check the docs on how classes are handled first. For patches, don't file issues if they are not optimal, only if they are incorrect.

state.copy_![prop] = value

image

Link to repro

a repo is a little complex, I have a customized redux, I give the draftState for each of the child reducer to process, but if I use current to give the non-draft state for child reducer to process, this issue doesn't exist.

A bug report without a reproduction is not a bug report. Failing to follow this templately is likely to result in an immediate close & lock of the issue.

Please provide either a CodeSandbox demo, or a PR with a unit test. In limited cases, a minimal repository on GitHub is accepted as well.

To Reproduce

Steps to reproduce the behavior:

Observed behavior

A description of what behavior you observed and why you consider it faulty.

Expected behavior

A clear and concise description of what you expected to happen instead.

Environment

We only accept bug reports against the latest Immer version.

  • Immer version:
  • I filed this report against the latest version of Immer
  • Occurs with setUseProxies(true)
  • Occurs with setUseProxies(false) (ES5 only)

Closing the issue for the lack of reproduction, as indicated in the issue template. Feel free to open a fresh one once a reproduction is available (or feel free to link one here, but not sure if that triggers the right notifications)

Closing the issue for the lack of reproduction, as indicated in the issue template. Feel free to open a fresh one once a reproduction is available (or feel free to link one here, but not sure if that triggers the right notifications)