Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Avoid Accidental Returns of New State by using the void Keyword


    A small caveat with Immer is that arrow functions that consist of just an expression, and not a function block, always return a value.

    In this lesson we will show that in these cases the void keyword can be used to avoid accidentally returning new state in addition to modifying the draft.