I ended up hacking my own version of the same idea, but with an explicit reference to a mutable data slot, much like the cursors in this post do.
I use a lot of Immutable.Record for domain objects, and I found that I could get nicely succinct code by adding a getter property to the cursor for each field in a record. It yields a new cursor if the value is an immutable collection too, or else the actual value the cursor points to. This seems like a weird heuristic until you realize that most programming languages make the same distinction (primitive values are cloned, object references are not).
This allows me to write code like
<span>{this.props.user.group.name}</span>
Where this.props.user is a cursor, not an immutable collection. This is cool, because I only pass around subcursors around my component tree, but I can address them as if they're the values themselves when rendering. And I can still mutate them as a cursor.I didn't publish this code, or even evaluate the performance of it, but if anyone cares I don't mind sharing.
I'm curious whether you could shoot any holes in that reasoning.
http://swannodette.github.io/2013/12/17/the-future-of-javasc...