mori
ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript (by swannodette)
immutable-js
Immutable persistent data collections for Javascript which increase efficiency and simplicity. (by immutable-js)
Our great sponsors
mori | immutable-js | |
---|---|---|
5 | 38 | |
3,388 | 32,843 | |
- | 0.1% | |
0.0 | 7.2 | |
almost 4 years ago | 29 days ago | |
Clojure | TypeScript | |
- | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mori
Posts with mentions or reviews of mori.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-03-16.
-
Om but in javascript
immutable-js or mori for immutable data structures
-
How to handle "mutable state" in a pure functional way
Use persistent immutable data structures (as implemented in, for instance, mori or Immutable.js) to represent the state. As much as possible, push calculations into referentially transparent functions (i.e., input depends purely on output) which take persistent data. Write the interactions with the real world in imperative style.
- Understanding Clojure's Persistent Vectors (2013)
-
Immutable.js is not dead!
Mori
immutable-js
Posts with mentions or reviews of immutable-js.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-07-12.
-
Yet another introduction to Functional Programming
immutable for JavaScript.
-
Imutability, react and typescrip: how to do it the clean way?
Check out Object.freeze. There's also Immutable.js for working with immutable data.
-
How To Scale Your React Applications
Use immutability to manage state updates When updating state in your React application, it's important to ensure that you are not mutating the original state object. Instead, you should create a new copy of the state object with the updated values. Immutability makes it easier to manage state updates and ensures that the updates are performed in a predictable and safe manner. Libraries like Immutable.js provide a set of functions that simplify working with immutable data in React applications.
-
Functional immutable game state
Enter Immutable.js, a library for creating and updating immutable state in JavaScript. With usual mutable JavaScript objects you might write something like:
The Immutable.js README has a much more complete description of immutability and why you might want to use the library. Also worth mentioning that Immer is an alternative which is a bit easier to get started with.
-
"console.log" Sometimes Print Wrong Data
Examples: immutable-js Immer
-
Immutable Collections should be Your Default
I can't speak to C# and Java, but the suggestion in this post: ImmutableJS already uses Persistent data structures. (It's the second sentence of their introduction)
-
immutable-js VS riux - a user suggested alternative
2 projects | 12 Aug 2022
-
Twitter Clone Part 3: Adding Tweet Reactions and Showing Notifications
feed.feedManager.state.activities is an immutable Map (created with Immutabe.js), so you get the activity object using getIn and toJS methods.
-
How do I handle objects with shared references in React?
You could create explicitly immutable references and state by using a tool like Immer.js or Immutable.js and do something like your example using their API.
What are some alternatives?
When comparing mori and immutable-js you can also consider the following projects:
Immer - Create the next immutable state by mutating the current one
ramda - :ram: Practical functional Javascript
lodash - A modern JavaScript utility library delivering modularity, performance, & extras.
RxJS
immutability-helper - mutate a copy of data without changing the original source
fp-ts - Functional programming in TypeScript
buckets - A complete, fully tested and documented data structure library written in pure JavaScript.
hashmap - HashMap JavaScript class for Node.js and the browser. The keys can be anything and won't be stringified
JSON-Schema Faker - JSON-Schema + fake data generators