News for hackers. Stuff that matters.
Re:React-cursor: a JavaScript implementation of the Cursor c... by dustingetz on Tuesday September 23, 2014 @04:28PM (#8357974)
That is correct. `cursor.value` always respects the react component lifecycle: this is what you always want in `render()`, `componentWillUpdate()` and other React lifecycle methods.

`cursor.pendingValue()` gives you the latest queued state update, which is always what you want in your event handlers (e.g. complicated state transitions in response to a click).

The decision is essential complexity, but at least when you use cursors the decision is mechanical. React has a slightly different API (but equivalent information) that makes the decision less mechanical.

There are no comments on this comment yet.