Skip to content

HeaderBackButton title prop #5802

@djorkaeffalexandre

Description

@djorkaeffalexandre

PROBLEM

I'm having problems, I need to set the back button title on screen two because on screen one I do not have access to the information I want to be shown in the title, I'm trying to use the prop title of the HeaderBackButton in version 3.6.1 of react-navigation but this isn't working.

Current Behavior

Hello, I'm working in Rocket.Chat.ReactNative Project and I'm implementing count of unread messages on headerBackButton, but my app does not show the title of HeaderBackButton Component.

On the use HeaderBackButton the prop 'title' doesn't work.

Expo Snack example:
Expo-Navigation

Example:

static navigationOptions = ({ navigation }) => {
  return {
    headerLeft: (
      <HeaderBackButton
        title='test'
        onPress={() => navigation.goBack()}
      />
    )
  };
}

Expected Behavior

I want to show the prop 'Title' in the right of the button.

Your Environment

software version
react-navigation 3.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions