Comments (8)
@hoaphantn7604 @arun-saleth
it's slow for me, I don't know why, tried useMemo didn't change
maybe i wrote it wrong, could you explain how to use useMemo or if there is another solution to this issue please help
from react-native-curved-bottom-bar.
Yes i am also facing issue while using nesting navigation.when clicking tab icons so much delay to navigate
from react-native-curved-bottom-bar.
hi @ducpt-bili , @arun-saleth ,
What steps can I follow to replicate the issue you are experiencing?
Have you tried using React.memo and then wrapping the BottomBar?
from react-native-curved-bottom-bar.
I will share my code here
<CurvedBottomBar.Navigator
style={styles.bottomBar}
screenOptions={{ headerShown: false }}
strokeColor="#DDDDDD"
circleWidth={60}
strokeWidth={1}
bgColor="white"
shadowStyle={styles.shawdow}
initialRouteName="Home"
// width={isTablet ? width / 2.3 : width}
borderTopLeftRight
renderCircle={({ selectedTab, navigate }) => (
<Animated.View style={styles.btnCircle}>
<TouchableOpacity
style={{
alignItems: "center",
flex: 1,
justifyContent: "center",
}}
onPress={pressfunc}
>
</Animated.View>
)}
tabBar={RenderTabBar}
>
<CurvedBottomBar.Screen name="Home" position="LEFT" component={Dashboardscreen} />
<CurvedBottomBar.Screen name="Job" component={isTablet && width > 700 ? JobstabletScreen : Jobscreen} position="LEFT" />
<CurvedBottomBar.Screen name="Calendar" component={CalendarScreen} position="RIGHT" />
<CurvedBottomBar.Screen name="Task" component={isTablet && width > 700 ? TasktabletScreen : Taskscreen} position="RIGHT" />
</CurvedBottomBar.Navigator>
const RenderTabBar = ({ routeName, selectedTab, navigate }) => {
return (
<TouchableOpacity
onPress={() => navigate(routeName)}
style={{
height: 50,
alignItems: "center",
}}
>
{_renderIcon(routeName, selectedTab)}
);
};
const _renderIcon = (routeName, selectedTab) => {
let icon = "";
switch (routeName) {
case "Home":
icon = routeName === selectedTab ? :
break;
case "Job":
icon = routeName === selectedTab ? :
break;
case "Calendar":
icon = routeName === selectedTab ? :
break;
case "Task":
icon = routeName === selectedTab ? :
break;
}
return (
<View style={styles.btmname}>
<View>{icon}</View>
<Text style={{ color: routeName === selectedTab ? Color.skyblue : "grey" }}>
{routeName}
</Text>
</View>
);
};
My nesting navigation structure:
------------------ Inside Drawernavigation I am using tab navigation -----------------------------------------
<Drawer.Navigator screenOptions={{ headerShown: false }} initialRouteName='HomeDrawer' drawerContent={(props) => <CustomDrawerContent
{...props} />}>
<Drawer.Screen name="HomeDrawer" component={TabNavigation} options={{ title: 'Home' }} />
</Drawer.Navigator>
from react-native-curved-bottom-bar.
@hoaphantn7604 when I expect this? .too much lagging
from react-native-curved-bottom-bar.
@hoaphantn7604 I tried memo.Its woking perfectly.Thank you for your Suggestions
from react-native-curved-bottom-bar.
Hi @arun-saleth
Can you share with me where to handle useMemo?
from react-native-curved-bottom-bar.
Related Issues (20)
- setVisible set to true cant show again the tab bar
- react-native-curved-bottom-bar doesn't seem to be linked.make sure:
- react-native-curved-bottom-bar doesn't seem to be linked.make sure: HOT 7
- Support screen options HOT 7
- Lagging while clicking the tabs HOT 2
- Can we add borderColor and borderWidth to curved tab HOT 6
- Render all tabs at startup/mounting HOT 3
- Bottom padding to <CurvedBottomBar.Navigator /> component style HOT 1
- [Android] Shadow issue on Expo HOT 4
- Work with expo-router
- options={{headerShown: false}} in CurvedBottomBar.Screen is not working HOT 8
- headerShown is false HOT 7
- i am trying to show component when user click on middle circle <Animated.view
- Dynamic changing of icon
- Border Width and Radius issue HOT 1
- custom curves HOT 1
- Navigating to stack with curved bottom bar shows white screen HOT 1
- strokeColor and strokeWidth issue on V3 HOT 1
- Curved Border colour and border width
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-curved-bottom-bar.