You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, currently I am trying to achieve a sliding bottom component in RN 0.76 using RNA 3.16. The component is working fine in RN 0.74 but not in latest native version.
In RN 0.76, the component's height is not changing on initial render but when I change tab, it is working as expected.
BottomTabNavigator.js file: This file contains BottomTabNavigator as well as SlidingBottom.js component
const BottomTab = createBottomTabNavigator();
const { height } = Dimensions.get('window');
const SNAP_TOP = height + StatusBar.currentHeight;
const SNAP_BOTTOM = 54 + 50;
const BottomTabNavigator = () => {
const yValue = useSharedValue(SNAP_BOTTOM);
return (
<>
{/* this component contain all screen and bottom tab navigator */}
<BottomTab.Navigator
tabBar={(props) => <BottomTabBar {...props} yValue={yValue} snapTop={SNAP_TOP} snapBottom={SNAP_BOTTOM} />}
initialRouteName="Home" // "Home" initial screen to render
backBehavior="history"
screenOptions={{
headerShown: false,
tabBarHideOnKeyboard: true,
}}
>
<BottomTab.Screen
name="Home"
component={Home}
options={{
tabBarLabel: "Home",
// we are importing focused as well as size from BottomTabBar.js file
tabBarIcon: ({ color }) => <HomeIcon height={icon_size} width={icon_size} fill={color} />,
}}
/>
<BottomTab.Screen
name="Search"
component={Search}
options={{
tabBarLabel: "Search",
tabBarIcon: ({ color }) => <SearchIcon height={icon_size} width={icon_size} fill={color} />
}}
/>
</BottomTab.Navigator>
{/* this component contains the mini player & player page */}
<SlidingBottom yValue={yValue} snapTop={SNAP_TOP} snapBottom={SNAP_BOTTOM} />
</>
);
}
export default BottomTabNavigator;
SlidingBottom.js: This contains the component that is facing issue
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So, currently I am trying to achieve a sliding bottom component in RN 0.76 using RNA 3.16. The component is working fine in RN 0.74 but not in latest native version.
In RN 0.76, the component's height is not changing on initial render but when I change tab, it is working as expected.
BottomTabNavigator.js file: This file contains BottomTabNavigator as well as SlidingBottom.js component
SlidingBottom.js: This contains the component that is facing issue
Also, I am using custom BottomTabBar:
Kindly help me community!!!
Beta Was this translation helpful? Give feedback.
All reactions