react-native/Examples/UIExplorer/Navigator
Hedger Wang 0a875790f5 [Navigator]: Allow developer to observe the focus change events from the owner or the children
of the navigator component.

Summary:
Per offline discussion with @evv, we'd like to deprecate the `onDidFocus` and `onWillFocus`
API that makes it really hard for the descendent children of a navigator to observe its focus
change events.
@public

Since for now the descendent children do have access to the navigator via `this.props.navigator`,
this diff makes it easy to observe the focus change event by doing:

```
this.props.navigator.addListener('willfocus', this._onFocus);
```

The goal is to make the event system in navigator more useful and maintainable.

Test Plan:
Test Video: https://www.facebook.com/pxlcld/mrzS
1. jest:  ./Libraries/FBReactKit/js/runTests.js NavigationEventEmitter
2. Load UI Explorer: <Navigator />, see console logs that shows the focus change events fires.
2015-06-16 09:09:08 -08:00
..
BreadcrumbNavSample.js [ReactNative] Rename NavigationBar props 2015-04-01 07:43:22 -08:00
JumpingNavSample.js [ReactNative] Start Navigator gesture config, disable gesture in AdsManager 2015-04-03 14:11:32 -08:00
NavigationBarSample.js [Navigator]: Allow developer to observe the focus change events from the owner or the children 2015-06-16 09:09:08 -08:00
NavigatorExample.js [Navigator]: Allow developer to observe the focus change events from the owner or the children 2015-06-16 09:09:08 -08:00