Sanctuary
Immer
Our great sponsors
Sanctuary | Immer | |
---|---|---|
5 | 141 | |
3,011 | 26,943 | |
0.1% | 1.0% | |
7.1 | 7.1 | |
3 months ago | 4 days ago | |
JavaScript | JavaScript | |
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.
Sanctuary
-
Ask HN: Freelancer? Seeking freelancer? (February 2024)
SEEKING WORK • Berlin, Germany • Remote or on-site • Software developer
I'm a software developer with 13 years of experience. I love leveraging software to save people time. I have a background in (visual) design and consider design to be crucial to the development of all software (even software with no visible interface).
I have deep knowledge of JavaScript. I have also worked professionally with TypeScript, Python, and Haskell. I enjoy working with HTML and CSS. I know React, and I'm looking for an opportunity to learn htmx.
I have created Sanctuary (https://sanctuary.js.org/) and several other libraries. :)
https://davidchambers.me/cv/
-
Ask HN: Who wants to be hired? (February 2024)
Location: Berlin, Germany
Remote: Yes
Willing to relocate: Possibly
Technologies: JavaScript, TypeScript, Python, Haskell, Clojure, Bash, SQL, HTML, CSS, React, htmx, functional programming
Résumé/CV: https://davidchambers.me/cv/
Email: [email protected]
Author of Sanctuary (https://sanctuary.js.org/) and several other libraries. I love writing parsers and interpreters. I enjoy writing shell scripts more than is healthy (ShellCheck is amazing). I love hyperlinks and discovering web standards.
-
Hegel – An advanced static type checker for JavaScript
I wonder if this will be something that functional libraries like Ramda [1] or Sanctuary [2] will be able to benefit from.
One of the reasons these libraries don't work so well with TS is that it doesn't have ML-style whole program inference and hence doesn't work so well with patterns like currying. Hegel seems more capable in that regard.
[1] https://ramdajs.com/
[2] https://github.com/sanctuary-js/sanctuary
-
Introduction to Functional Programming in JavaScript
Fortunately, as it has been shown in this article, it’s definitely possible to use functional programming with plain JavaScript. However, if you really want to dive deeper into this paradigm while using JavaScript, you’ll probably want to use some already existing functional libraries such as Sanctuary, Fluture, Ramda and others.
-
Sanctuary Cheat Sheet
Hey everyone, I put together a [Cheat Sheet](https://github.com/identinet/sanctuary-cheat-sheet) for [Sanctuary](https://sanctuary.js.org/) that I hope is helpful to you.
Immer
-
Immer VS mutative - a user suggested alternative
2 projects | 25 Jan 2024
-
Show HN: Cami.js – A No Build, Web Component Based Reactive Framework
```
It looks like it’s mutating, but both the reducers and update() uses immer* under the hood, so we still respect immutability under the hood.
Cami supports redux devtools so you can use that for time-travel debugging too!
—-
* https://github.com/immerjs/immer
- Why do we need modules at all?
-
Making Sense of React Server Components
I heard that immutability libraries like immer.js [0] help with this. Anyone go this way and had good success? Is this 'the way'?
[0]: https://immerjs.github.io/immer/
-
How We Fixed Performance With JS Object Variable Mutation
So, that's what we built, and we built it in the most obvious way — using JavaScript Proxy objects to track mutations and reflect those changes across Appsmith’s framework. Initially things looked good — it worked, aside from a few hacks to make some data types work with map and set, and we were following the example of other projects that had similar requirements. If it was good enough for them, it should be good enough for us, right?
-
The sword refers to immer, the faster and stronger immutable data js tool limu stable version released!
But is immer really the ultimate answer? The performance problem of immer is more prominent in large arrays and deep-level object scenarios. See this issue description, many authors in the community began to try to make breakthroughs, and noticed that structura and mutative, I found that it is indeed many times faster than immer as they said, but it still fails to solve the problem of both fast speed and good development experience. I will analyze the two issues in detail below.
-
Ramda: A practical functional library for JavaScript programmers
I like immer for this kind of thing: https://github.com/immerjs/immer
It gives you immutable updates without getting bogged down in FP abstractions.
-
Why my variable is being mutated if I make any changes to my data ?
I've always been a huge fan of immer for these case. For your code, it would simply turn into setGridData((prev) => produce(prev, draft => applyChanges(changes, draft)) but I recommend you go over their documentation to fully understand how it works
-
Is there a better way to do read-only types
If you're trying to make things actually immutable, Object.freeze and deep copies can clutter things up pretty good, have you considered using something like immer? (https://immerjs.github.io/immer/)
-
5 React Libraries to Level Up your Projects in 2023
If you want to set up from Context, Zustand is your best bet. It offers an extremely simple API that lets you create a store with values and functions. Then, you can access that store from anywhere in your application to read and write values. Reactivity included! If you want to store nested object data in your store, consider using Immer alongside Zustand to easily change nested state.
What are some alternatives?
ramda - :ram: Practical functional Javascript
immutability-helper - mutate a copy of data without changing the original source
RxJS
immutable-js - Immutable persistent data collections for Javascript which increase efficiency and simplicity.
Index - ⚡ Pattern Matching in Typescript
redux-toolkit - The official, opinionated, batteries-included toolset for efficient Redux development
Rambda - Faster and smaller alternative to Ramda
Recoil - Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.
lodash - A modern JavaScript utility library delivering modularity, performance, & extras.
react-query - 🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]
underscore-contrib - The brass buckles on Underscore's utility belt
valtio - 💊 Valtio makes proxy-state simple for React and Vanilla