React-Native collapsing header with nativedriver
npm install react-native-collapsing-headernpm install --save react-native-collapsing-header
OR
yarn add react-native-collapsing-header
``javascript
import CollapsingHeader from 'react-native-collapsing-header';
import Text from 'react-native';
export default class Example extends Component {
render() {
return (
scrollEventThrottle={16} // 16 is default value (Optional)
headerMaxHeight={199} // 199 is default value (Optional)
headerMinHeight={117} // 117 is default value (Optional)
>
)
}
}
// if you want to change the opacity of the header or a part of it while scrolling, just wrap it in an Animated.View (look at the example below)
const HeaderExample = (opacity) => {
return (
}}>
)
}
``