Usage with react-navigation #396
-
In my react-native project I'm using react-navigation for navigating through my various screens. However, I would like to customize their header and use for example a parallax header. import {createStackNavigator} from '@react-navigation/stack';
const Stack = createStackNavigator<RootStackParamList>();
const Navigator = () => {
return (
<Stack.Navigator screenOptions={{header: props => <MyCustomHeader {...props} />}}>
<Stack.Screen name="Screen1" component={ScreenOne} />
<Stack.Screen name="Screen2" component={ScreenTwo} />
<Stack.Screen name="Screen3" component={ScreenThree} />
</Stack.Navigator>
)
} So in this case Do you know, if there is any other possibility to use these both libraries? EDIT: I had something like this in mind: parallax-header.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @eidermaen, unfortunately it's not possible to integrate this library into react-navigation header setup. Sticky Parallax Header library provides scroll components with sticky header support. If you want to render one of those scroll components inside react-navigation screen, the only way is to render them "fullscreen" and disable default react-navigation header (passing |
Beta Was this translation helpful? Give feedback.
Hi @eidermaen, unfortunately it's not possible to integrate this library into react-navigation header setup. Sticky Parallax Header library provides scroll components with sticky header support. If you want to render one of those scroll components inside react-navigation screen, the only way is to render them "fullscreen" and disable default react-navigation header (passing
header: () => null
as one of navigation options).