Stop handling animation once Navigator is unmounted.

Summary: public
Navigator subscribes to its internal animation spring that may still
asks navigator to re-render after being unmounted.

This diff clears the listeners of its animation spring once navigator
is unmounted.

Reviewed By: zjj010104

Differential Revision: D2588434

fb-gh-sync-id: 2b3ee65d3a6c3d45e5c6904d1dc65ac5a3e4534a
This commit is contained in:
Hedger Wang 2015-10-27 18:28:42 -07:00 committed by facebook-github-bot-7
parent 80070983ea
commit ae58fe221b

View File

@ -346,6 +346,7 @@ var Navigator = React.createClass({
this._navigationContext.dispose();
this._navigationContext = null;
}
this.spring.removeAllListeners();
},
/**