return-optics VS Recoil

Compare return-optics vs Recoil and see what are their differences.

return-optics

Extending Return with Lenses to do fun things in the Elm update function (by toastal)

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. (by facebookexperimental)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
return-optics Recoil
1 81
13 19,445
- 0.4%
10.0 3.7
over 6 years ago 1 day ago
Elm JavaScript
BSD 3-clause "New" or "Revised" License 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.

return-optics

Posts with mentions or reviews of return-optics. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-02-28.
  • Solid.js feels like what I always wanted React to be
    17 projects | news.ycombinator.com | 28 Feb 2022
    Yeah? I wrote something to deal with it too (https://github.com/toastal/return-optics) 5.5 years ago. You arguably chose the wrong data as `(model, Cmd msg, Maybe extMsg)` instead of `(model, Cmd msg, List extMsg)` which would give you more flexibility and still functions as a monoid on [] instead of Nothing, but allows multiple messages shrug. I tried this approach more recently and it involved me having to encode all of actions in a massive tree and then I still had issues with certain messages including now having to UUID all elements that that previously I didn't need to think about. It was a mess, but the best I could do with the tools at hand.

    If you compare this to Halogen (https://github.com/purescript-halogen/purescript-halogen/blo...) where you still have purity but can set up subscribers and listeners from any component. It's much easier to use and for some components like dialogs, it's much simpler. And this actually isn't the best example because with the latest Halogen, Portals (https://github.com/purescript-halogen/purescript-halogen/pul...) was introduced so you can launch a dialog on the spot instead of even needing to communicate between them at all.

Recoil

Posts with mentions or reviews of Recoil. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-08.

What are some alternatives?

When comparing return-optics and Recoil you can also consider the following projects:

solid-docs - Cumulative documentation for SolidJS and related packages.

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]

zustand - 🐻 Bear necessities for state management in React

MobX - Simple, scalable state management.

jotai - 👻 Primitive and flexible state management for React

rtk-query - Data fetching and caching addon for Redux Toolkit

rematch - The Redux Framework

redux-toolkit - The official, opinionated, batteries-included toolset for efficient Redux development

Immer - Create the next immutable state by mutating the current one

valtio - 💊 Valtio makes proxy-state simple for React and Vanilla

Preact - ⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.

redux - A JS library for predictable global state management