6e2f07fb81
Summary: While adeveloper requests the emitter to emit an event, the emitter may not emit the event immediately instead of putting the request into a queue and process it later. This diff allows the developer to provide a callback which will be called when the event has been emitted. For instance: ``` class NavigationContext { push(nextRoute) { var nextStack = this._stack.push(nextRoute); this.emit( 'change', { reason: 'push', nextStack: nextStack, nextRoute: nextRoute, }, this._onPush ); } _onPush(event){ if (event.defaultPrevented) { return; } this._stack = event.nextStack; this.emit('change'); } } ``` |
||
---|---|---|
.. | ||
Navigation | ||
Navigator.js | ||
NavigatorBreadcrumbNavigationBar.js | ||
NavigatorBreadcrumbNavigationBarStyles.ios.js | ||
NavigatorNavigationBar.js | ||
NavigatorNavigationBarStyles.ios.js | ||
NavigatorSceneConfigs.js |