This site runs best with JavaScript enabled.

Technology that I was wrong about

November 19, 2019

Most people write about tools they used successfully. Today, I want to discuss technology that I was wrong about.

Immer

Immer (German for: always) is a tiny package that allows you to work with immutable state in a more convenient way. It is based on the copy-on-write mechanism.

The basic idea is that you will apply all your changes to a temporary draftState, which is a proxy of the currentState. Once all your mutations are completed, Immer will produce the nextState based on the mutations to the draft state. This means that you can interact with your data by simply modifying it while keeping all the benefits of immutable data.


Share article

Jared Palmer is a software developer based in New York City. He is the founder of Formium, a developer-focused form builder and also the author of popular open source software including Formik, TSDX, and Razzle.

PreviousWhat's new in ES 2020?NextGatsby vs. Next.js