mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
1232666590
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.