usepropeller/react.backbone — pull request #18 by EamonNerbonne (2014-04-15 07:24:04+00:00)
Title: Fix controlled components and changing models

This PR builds on https://github.com/usepropeller/react.backbone/pull/15.

It fixes two subtle bugs:

1. When the model was changed due to a prop change, the event handlers were not rebound properly. This PR rebinds them correctly.

2. When the model was updated, due to the debounce, controlled components would lose cursor positoin. This PR avoids the debounce for models, and only debounces collections. Note that this still isn't an ideal situation - really we'd want to fix this on the React side of things, such that forceUpdates aren't immediate, because it's just wasteful to re-render all the time (and this isn't the only way to cause re-renders).