const concat = require('lodash/concat'); const React = require('react'); const { BackHandler } = require('react-native'); const Navigation = require('../services/Navigation'); const Root = require('../components/Root'); const Button = require('../components/Button'); const { PUSHED_SCREEN_HEADER, TOP_BAR_BTN, PUSH_BTN, POP_BTN, PUSH_NO_ANIM_BTN, POP_TO_FIRST_SCREEN_BTN, POP_TO_ROOT_BTN, ADD_BACK_HANDLER, REMOVE_BACK_HANDLER, SET_STACK_ROOT_BUTTON, PUSH_OPTIONS_BUTTON, HIDE_PREVIOUS_SCREEN_TOP_BAR } = require('../testIDs'); const Screens = require('./Screens'); class PushedScreen extends React.Component { static options() { return { topBar: { testID: PUSHED_SCREEN_HEADER, title: { text: 'Pushed Screen' }, rightButtons: { id: 'singleBtn', text: 'single', testID: TOP_BAR_BTN } } }; } constructor(props) { super(props); Navigation.events().bindComponent(this); } navigationButtonPressed({ buttonId }) { if (buttonId === 'backPress') alert('back button clicked') } render() { const stackPosition = this.getStackPosition(); return (