You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently started using ImmerJS and encountered a challenging issue. In my data structure, there is a property with a key as Symbol, which is only used for querying purposes and will not be modified when using ImmerJS. Specifically, I try to query and modify certain data through v[S1].id.
However, when outputting the result in the console, I noticed that although the corresponding value was successfully modified, strangely my Symbol key S1 was converted into a Proxy object. This has left me feeling very confused and frustrated.
Could you please let me know if this is a known bug or behavior caused by some boundary conditions? If anyone can provide an explanation or point to relevant documentation/discussion links, I would greatly appreciate it. Thank you all!
Link to repro
Please provide a CodeSandbox demo to clarify your question if possible. Typically, questions without minimal codesandbox demo won't be answered.
Environment
We only accept questions against the latest Immer version.
Immer version:
Occurs with setUseProxies(true)
Occurs with setUseProxies(false) (ES5 only)
version: "immer": "^10.0.2"
The text was updated successfully, but these errors were encountered:
🙋♂ Question
Hello everyone,
I recently started using ImmerJS and encountered a challenging issue. In my data structure, there is a property with a key as Symbol, which is only used for querying purposes and will not be modified when using ImmerJS. Specifically, I try to query and modify certain data through
v[S1].id
.However, when outputting the result in the console, I noticed that although the corresponding value was successfully modified, strangely my Symbol key
S1
was converted into a Proxy object. This has left me feeling very confused and frustrated.Could you please let me know if this is a known bug or behavior caused by some boundary conditions? If anyone can provide an explanation or point to relevant documentation/discussion links, I would greatly appreciate it. Thank you all!
Link to repro
Please provide a CodeSandbox demo to clarify your question if possible. Typically, questions without minimal codesandbox demo won't be answered.Environment
We only accept questions against the latest Immer version.
setUseProxies(true)
setUseProxies(false)
(ES5 only)version:
"immer": "^10.0.2"
The text was updated successfully, but these errors were encountered: