mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Recreating the class instance causes refs (and other callbacks) to close over stale instances. Instead, re-use the previous instance. componentWillMount is called again. We also call componentWillReceiveProps, to ensure that state derived from props remains in sync.