Maintain your React state with Cursors.
Cursors is a React mixin that is inspired by David Nolen's Om. This is a much lighter implementation that is focused on Nolen's idea of a single global state and using cursors to create smaller local states within a single shared data structure.
bower install cursors
The Cursors object itself should be mixed-in to all Cursors-using components.
Returns a new
cursor with its path set to
key's path concatenated with
path should both be a
number. Use an array of
path if your path goes more than one level
Update the state with the change definitions in
check out React's Immutability Helpers.
Check out the test file for a full example. Here's the basics:
var User = React;var Users = React;React;