react-native/Examples
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
..
2048 Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
Movies Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
SampleApp Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
TicTacToe Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues 2015-06-15 07:52:50 -08:00
UIExplorer [Navigator]: Allow developer to observe the focus change events from the owner or the children 2015-06-16 09:09:08 -08:00