benevbright/react-navigation-collapsible

Usage with react-native-tab-view

Closed this issue · 1 comments

Would be great to get a working example with react-native-tab-view.
Which is the component that react-navigation-tabs uses. I wonder how to implement that.
I'm using it because I need dynamic tabs.

You will get translateY in this.props.collapsible props when you use withCollapsible.

https://github.com/benevbright/react-navigation-collapsible#given-props

render () {
  const {
    paddingHeight,
    translateY, // 0 ~ collapsibleHeaderHeight
    translateOpacity, // 1.0 ~ 0.0
    translateProgress, // 0.0 ~ 1.0
    animatedY,
    onScroll,
  } = this.props.collapsible;

  // ...
}

const {paddingHeight, animatedY, onScroll} = this.props.collapsible;

So, I think you can translate the Y position of your Tab component with it.