limu
superjson
Our great sponsors
limu | superjson | |
---|---|---|
8 | 9 | |
201 | 3,678 | |
8.5% | 8.7% | |
8.2 | 7.6 | |
about 2 months ago | 4 months ago | |
JavaScript | TypeScript | |
MIT License | MIT License |
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.
limu
-
Focusing on optimization, surpassing immer, limu finally reaches the top of immutable data performance
limu is designed for modern browsers. It only considers the operating environment that supports Proxy and uses the mechanism of shallow copy on read and mark update on write. This allows users to operate variable data like original data. During the operation, only proxy objects are generated for the read nodes and returned to the user. After reading, the parent and child nodes are directly connected with shallow clone nodes. The proxy object is hidden in the meta data of the node. , after the operation is completed, a new data with structural sharing characteristics is generated, and the meta data generated during the reading process is removed.
-
Deep Cloning Objects in JavaScript, the Modern Way
for those recommending Immer, check out Mutative or Limu instead (much faster)
https://github.com/unadlib/mutative
https://github.com/tnfe/limu
-
Limu, the fastest immutable data JavaScript lib was borned
Strongly recommend trying [limu](https://github.com/tnfe/limu),it is now the fastest immutable data js lib,and it is also production environment available.
//You can verify through the following tests, and you are also welcome to add more performance test cases
-
The sword refers to immer, the faster and stronger immutable data js tool limu stable version released!
Welcome to understand and pay attention to limu, visit documentation and right-click to bring up the console, you can ** Real-time experience **limu api and immer api for comparison (limu and immer objects are bound globally).
-
Limu, a Fast Immutable Lib
You are very welcome to submit your test to the benchmark directory of limu git repo
limu 🍋
superjson
-
Deep Cloning Objects in JavaScript, the Modern Way
I wasn't aware of this, I would like to give a shout out to superjson (https://github.com/blitz-js/superjson) which I had been using to solve this problem. I will look at this solution for next time.
- Superjson – serialize JavaScript Dates, Maps, Sets to cross service boundaries
- GitHub - blitz-js/superjson: Safely serialize JavaScript expressions to a superset of JSON, which includes Dates, BigInts, and more.
- Superjson: Safely serialize JavaScript expressions to a superset of JSON
- Aplicativos da Web totalmente tipados
-
I've spent the whole day on this, but no luck, I wanna die :)
Here you go https://github.com/blitz-js/superjson
-
Rich on serialization
superjson has a plugin system and also supports ObjectId. https://github.com/blitz-js/superjson/pull/71
-
Prisma not working with next serversideprops
Hey Mahmoud from Prisma here 👋🏼 Next.js doesn't serialize the Date type. There are a couple of workarounds discussed in this GitHub discussion. Personally, I found that using superjson to be the simplest approach.
What are some alternatives?
mutative - Efficient immutable updates, 2-6x faster than naive handcrafted reducer, and more than 10x faster than Immer.
babel-plugin-superjson-next - Automatically transform your Next.js Pages to use SuperJSON
hel - A module federation SDK which is unrelated to tool chain for module consumer. 工具链无关的运行时模块联邦sdk.
SurveyJS - Free Open-Source JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout that lets you load and run multiple web forms, or build your own self-hosted form management system, retaining all sensitive data on your servers. You have total freedom of choice as to the backend, because any server + database combination is fully compatible.
Immer - Create the next immutable state by mutating the current one
blitz-guard - Blitz Guard - The centralized permission based authorization for Blitz.js
concent - A reactive atomic state engine for React like.
monarch-map
structura.js - A very fast and lightweight Typescript library to create immutable states with a mutable syntax
Prisma - Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
redux-connect - Provides decorator for resolving async props in react-router, extremely useful for handling server-side rendering in React
remix-routes - Typesafe routing for your Remix apps.