I've been trying to use the react-navigation drawer in my app. I figured out we receive progress(reanimated node) of the drawer in drawerContent props of Navigator. Is there any way I can use this progress in my Screen component. Here's my code.
const drawerContent = useCallback(
({ progress, ...props }: any) => {
setProgress(progress);
return (
<DrawerContent {...props} />
)
}, []
)
<Drawer.Navigator
drawerContent={drawerContent}>
<Drawer.Screen name="HomeDrawer">
{(props) => <Screen {...{ style }} {...props} />}
</Drawer.Screen>
</Drawer.Navigator>