N
N
Newbie Ivanovich2019-06-17 08:59:55
React Native
Newbie Ivanovich, 2019-06-17 08:59:55

How to render a component in the StackNavigator header?

In the application, the header should display the login, balance and card button.
I use the stack navigator to navigate the screens. In navigationOptions, using the header parameter, it is not possible to render the component in the header.
who did tell me how to do it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Panteleev, 2019-06-24
@NovichokIvanovich

Please show the code that doesn't work for you.
It renders quite correctly :)

const Navigator = createStackNavigator({
  About: {
    screen: Index,
    navigationOptions: {
      headerBackTitle: 'Назад',
      headerTruncatedBackTitle: 'Назад',
      header: <Header/>,
    },
  },
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question