Become a member
to unlock all features

Create egghead account to access 5000+ tutorials and resources from expert developers.

Create account

    Return Completely New State from an Immer Producer


    Occasionally, you might want to write a producer that doesn’t change the draft, but rather returns a completely new data set. This can be achieved by using the return keyword.