JavaScript library to efficiently mutate data without changing the original source

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/javascript

Our great sponsors
  • Klotho - AWS Cloud-aware infrastructure-from-code toolbox [NEW]
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Sonar - Write Clean JavaScript Code. Always.
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • immutability-helper

    mutate a copy of data without changing the original source

  • ramda

    :ram: Practical functional Javascript

    if you want to write immutable code https://ramdajs.com/ is a great library

  • Klotho

    AWS Cloud-aware infrastructure-from-code toolbox [NEW]. Build cloud backends with Infrastructure-from-Code (IfC), a revolutionary technique for generating and updating cloud infrastructure. Try IfC with AWS and Klotho now (Now open-source)

  • immutable-js

    Immutable persistent data collections for Javascript which increase efficiency and simplicity.

    However, the way Immer uses that phrase seems to be different than how Immutable.js uses that phrase: https://immutable-js.github.io/immutable-js/ , https://medium.com/@dtinth/immutable-js-persistent-data-structures-and-structural-sharing-6d163fbd73d2. It specifically points to the use of specialized data structures like "hash mapped tries" as a mechanism to reuse existing references. Immer definitely doesn't use any of those.

  • Immer

    Create the next immutable state by mutating the current one

    Yes, Immer's docs say it uses "structural sharing": https://immerjs.github.io/immer/ . Specifically, it just leaves existing references as-is if they don't need to be updated.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts