message: Skipped back handlers if tab not selected
diff: import React from 'react';
  import { requireNativeComponent, StyleSheet } from 'react-native';
  +import BackButton from './BackButton';
  +import BackHandlerContext from './BackHandlerContext';
  -var TabBarItem = ({onPress, ...props}) => (
  +var createBackHandler = () => {
  + var listeners = [];
  + var addEventListener = (eventName, handler) => {
  + if (listeners.indexOf(handler) === -1)
  + listeners.push(handler);
  + return { remove: removeEventListener(eventName, handler) };
  + }
  + var removeEventListener = (_, handler) => {
  + if (listeners.indexOf(handler) !== -1)
  + listeners.slice(listeners.indexOf(handler));
  + }
  + return {listeners, addEventListener, removeEventListener};
  +}
  +
  +class TabBarItem extends React.Component<any> {
  + private backHandler: any;
  + constructor(props) {
  + super(props);
  + this.handleBack = this.handleBack.bind(this);
  + this.backHandler = createBackHandler();
  + }
  + handleBack() {
  + if (this.props.selected) {
  + for (var i = this.backHandler.listeners.length - 1; i >= 0; i--) {
  + if (this.backHandler.listeners[i]())
  + return true;
  + }
  + }
  + return false;
  + }
  + render() {
  + var {onPress, children, ...props} = this.props;
  + return (
  <NVTabBarItem
  {...props}
  style={styles.tabBarItem}
  @@ -9,8 +43,15 @@ var TabBarItem = ({onPress, ...props}) => (
  event.stopPropagation();
  if (onPress)
  onPress(event);
  - }} />
  + }}>
  + <BackButton onPress={this.handleBack} />
  + <BackHandlerContext.Provider value={this.backHandler}>
  + {children}
  + </BackHandlerContext.Provider>
  + </NVTabBarItem>
  );
  + }
  +};
  var NVTabBarItem = requireNativeComponent<any>('NVTabBarItem', null);
  