2021-01-12
1294
#vanilla javascript
Elizabeth Amaechi
32297
Jan 12, 2021 â‹… 4 min read

Immer and Immutable.js: How do they compare?

Elizabeth Amaechi Web developer and technical writer.

Recent posts:

Rxjs Adoption Guide: Overview, Examples, And Alternatives

RxJS adoption guide: Overview, examples, and alternatives

Get to know RxJS features, benefits, and more to help you understand what it is, how it works, and why you should use it.

Emmanuel Odioko
Jul 26, 2024 â‹… 13 min read
Decoupling Monoliths Into Microservices With Feature Flags

Decoupling monoliths into microservices with feature flags

Explore how to effectively break down a monolithic application into microservices using feature flags and Flagsmith.

Kayode Adeniyi
Jul 25, 2024 â‹… 10 min read
Lots of multi-colored blue and purplish rectangles.

Animating dialog and popover elements with CSS @starting-style

Native dialog and popover elements have their own well-defined roles in modern-day frontend web development. Dialog elements are known to […]

Rahul Chhodde
Jul 24, 2024 â‹… 10 min read
Using Llama Index To Add Personal Data To Large Language Models

Using LlamaIndex to add personal data to LLMs

LlamaIndex provides tools for ingesting, processing, and implementing complex query workflows that combine data access with LLM prompting.

Ukeje Goodness
Jul 23, 2024 â‹… 5 min read
View all posts

One Reply to "Immer and Immutable.js: How do they compare?"

  1. It is not correct to say that assignment does not imply mutation. Mutation simply means changing something. Assignment involves a mutation of the environment in which code executes; either a new name is installed which maps to the value corresponding to the right hand side of the assignment expression, or else the value installed under that name is updated to the new value.

    Before you say this is pedantic and unimportant, consider that the example given for assignment used the var keyword, which can easily result in updates to the global environment. The effect could be that a function in some other module which could have previously been idempotent in effect loses this property, ie. that now running it before the assignment occurs has a different effect than running it after.

    This is analogous to modifying prototypes owned by other modules, such as that of Array or Object; as it may cause undesirable behaviour it should not be done.

    The scope of a mutation’s effects may be limited sufficiently by use of strict mode, and for example, the use of const and let instead of var.

Leave a Reply