HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
dustingetz
react-cursor
JavaScript2014–2017
dustingetz / react-cursor · Archived

react-cursor

Immutable state for React.js

4Distinct people
19Mentions
1Explicit recommenders
1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Immutable state for React.js

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

I am the author of react-cursor, which abstracts over the react immutability helpers[1], which I have used in four large projects. It scales great and I recommend it over…

dustingetz used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 6:01:08 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year19 dated mentions

Observed mentions: 2014-07-21 19:26:03 UTC to 2017-11-01 16:13:38 UTC.

02468102014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 9 mentions; 1 submissions, 8 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2017

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC918
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC606
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC303

What Hacker News says

9 sources
SEEKING WORK - Philly or remote Full stack web apps, ReactJS expert, built two enterprise grade frontends in ReactJS (designed and led implementation - 50 to 100 pages of wireframes), two open source React libraries, multiple conference talks and workshops. Seeking long term ClojureScript work or short-medium term Javascript contract. (I am open to fixed price bids and project ownership, I have access to a small team who I have worked with before) https://github.com/dustingetz/react-cursor https://github.com/wingspan/wingspan-forms https://www.linkedin.com/in/dustingetz
In Ask HN: Freelancer? Seeking freelancer? (October 2014)
Location: Philly Remote: Maybe Willing to relocate: Maybe Technologies: Clojure, ClojureScript Full stack web apps, ReactJS expert, built two enterprise grade frontends in ReactJS (designed and led implementation - 50 to 100 pages of wireframes), two open source React libraries, multiple conference talks and workshops. However I am no longer interested in working in javascript except on a contracting basis. https://github.com/dustingetz/react-cursor https://github.com/wingspan/wingspan-forms https://www.linkedin.com/in/dustingetz
In Ask HN: Who wants to be hired? (October 2014)
if your state is { foo: ['a','b','c'] }, you can either do: cursor.refine('foo', 3).onChange('d') cursor.refine('foo').onChange(['a', 'b', 'c', 'd']) (indexes in a js array are the same as keys in a map) It is possible to implement `push` and other list/object ops that are exposed by React.addons.update, they have not been implemented yet because they make the interface more complicated. http://facebook.github.io/react/docs/update.html I opened an issue for discussion: https://github.com/dustingetz/react-cursor/issues/10
In React-cursor: a JavaScript implementation of the Cursor concept first seen in Om
GitHub.com/dustingetz/react-cursor It supports o(1) shouldComponentUpdate My hn comment history has some discussion about it I'm on my phone now but if you email me I can give more info. I've used react-cursor in two enterprise grade apps in regulated industries and couldn't imagine using react without cursors (believe me I tried)
In A Conceptual Look at Om (ClojureScript for React.js)
you are right, this is a sticky spot when using immutability from javascript - you can clone-and-mutate (I started here, but it quickly became a bottleneck in my app, and jr developers forget a lot leading to hard to find bugs) - you can use real persistent datastructures (Mori), but now you have added a cross cutting concern - which type of array is the one i'm working with right now? - you can use React.addons.update (I use this successfully, but you need to get used to a weird syntax) Om provides an abstraction over React state called Cursors which provides immutable updates to react state at any point in a state subtree. I ported this concept to javascript (implemented in terms of React.addons.update) and have used this successfully in two large scale enterprise applications for regulated industries and I know of one other company usi
Read the rest
ng this. This provides a very clean and elegant programming model for immutable updates to react state. https://github.com/dustingetz/react-cursor/ https://github.com/dustingetz/react-cursor/blob/master/examp...
In From Backbone to React: Our Experience Scaling a Web Application
I've done some research too - check out this implementation of cursors, it enables drop-in O(1) shouldComponentUpdate (like Om) and is compatible with rAF batching (like Om). We explored Mori for a bit too and ended up deciding Mori wasn't worth it. (Our app was big enough that we experienced pretty brutal performance without shouldComponentUpdate. Now our bottleneck is methods like Array.prototype.map over large lists in render, which Mori can't help with - we have to restructure our state away from lists and into trees to better take advantage of shouldComponentUpdate) https://github.com/dustingetz/react-cursor/blob/master/examp... https://github.com/dustingetz/react-cursor/blob/master/js/Cu... (It is backed by react.addons.update, it provides a mechanism like mori.assoc_in for immutable subtree updates, and it preserves reference equal
Read the rest
ity for equivalent cursors (value/onChange tuples)) (Cursors are also not vulnerable to issue#122 https://github.com/facebook/react/issues/122)
In Virtual DOM in Elm

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.