immerjs / immer

Create the next immutable state by mutating the current one
https://immerjs.github.io/immer/
MIT License
27.53k stars 852 forks source link

underfined is not a function #1048

Closed LouisMuriuki closed 6 months ago

LouisMuriuki commented 1 year ago

🐛 Bug Report

I am using immer in my react Native app and I updated immer to version "^10.0.1", before I was using version "^9.0.18". I also updated my expo version which somehow enabled hermes by default. This triggers the error whenever I pass data to my reducers "underfined is not a function"

This is how I was using it across all my reducers addProducts: (state, action) => { return produce(state, (draftState) => { draftState.products = action.payload; }); },

I decided to downgrade back to version 9.0.18, and now it works again like before without the error

mweststrate commented 1 year ago

check the release notes

On Sat, 6 May 2023, 08:30 louis Muriuki, @.***> wrote:

🐛 Bug Report

I am using immer in my react Native app and I updated immer to version "^10.0.1", before I was using version "^9.0.18". I also updated my expo version which somehow enabled hermes by default. This triggers the error whenever I pass data to my reducers "underfined is not a function"

This is how I was using it across all my reducers addProducts: (state, action) => { return produce(state, (draftState) => { draftState.products = action.payload; }); },

I decided to downgrade back to version 9.0.18, and now it works again like before without the error

— Reply to this email directly, view it on GitHub https://github.com/immerjs/immer/issues/1048, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBFN7QFIBRJ6DW37JITXEXVXXANCNFSM6AAAAAAXX47VVY . You are receiving this because you are subscribed to this thread.Message ID: @.***>