prevent menu icon replace back button react native code example

Example 1: how to add button in alert box in react native

// Works on both Android and iOS
Alert.alert(
  'Alert Title',
  'My Alert Msg',
  [
    {text: 'Ask me later', onPress: () => console.log('Ask me later pressed')},
    {
      text: 'Cancel',
      onPress: () => console.log('Cancel Pressed'),
      style: 'cancel',
    },
    {text: 'OK', onPress: () => console.log('OK Pressed')},
  ],
  {cancelable: false},
);

Example 2: remove back button text nav bar swift

navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)

Example 3: show back button in navbar swift

let backButton = UIBarButtonItem()
 backButton.title = "New Back Button Text"
 self.navigationController?.navigationBar.topItem?.backBarButtonItem = backButton

Example 4: disable a button react

// Input field listens to change, updates React's state and re-renders the component.
<input onChange={e => this.setState({ value: e.target.value })} value={this.state.value} />

// Button is disabled when input state is empty.
<button disabled={!this.state.value} />