9
votes

I am using the React-Native-Navigation v2 from wix (NOT React-Navigation). I tried disabling the topBar which is rendered by default.

I used following options and am rendering bottomTabs:

Navigation.setDefaultOptions({
  topBar: {
    visible: false,
    _height: 0,
    drawBehind: true,
  },
});

The topBar disapears but shows an drawBehind animation on initial opening of the Tabs of bottomTabs.

Is there a way to disable the topBar ?

Best regards

1
Thanks for writing the answer back, helped me! - Berke
you should probably answer your own question and accept it. - SudoPlz
Thanks for the comment. Didn't knew that this is best practice - tabulaR

1 Answers

6
votes

I added animate: false to the defaultOptions and removed _height

Navigation.setDefaultOptions({
  topBar: {
    visible: false,
    drawBehind: true,
    animate: false,
  }
});

this worked for me and doesn't show the animating on tabchange