Git Product home page Git Product logo

Comments (12)

hoaphantn7604 avatar hoaphantn7604 commented on June 15, 2024 2

hi @buscanopaul ,
You can refer to Ex:

import React, { useImperativeHandle } from 'react';
import { View } from 'react-native';
import { styles } from './styles';

export const HomeScreen = React.forwardRef((props, ref) => {
  useImperativeHandle(ref, () => {
    return { reload: reload };
  });

  const reload = () => {
    // Events
  };

  return <View style={styles.main} />;
});

You get curentRef then call reload function.

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on June 15, 2024 1

You cannot pass inside a stack of react-navigation. replace by a single component.
Using "const { navigate } = useNavigation()" to navigate inside

from react-native-curved-bottom-bar.

buscanopaul avatar buscanopaul commented on June 15, 2024 1

Hi @hoaphantn7604, Thank you for your response.

My main issue was I can't reset the nested stack navigator or go back to initial route stack navigator when I click again the bottom navigation icon (home). Please refer screenshot below

Screen Shot 2021-12-08 at 4 06 43 PM

In the screenshot Instead of click the back button to reset the nested stack navigator. I want to reset it when I click the home icon again. Just like the default react navigation bottom tab behavior.

Here's my app.js
<NavigationContainer> <TabNavigator /> </NavigationContainer>

In my TabNavigator.js. I'm just using the Example 1 template just replace View with my stack navigator component
<CurvedBottomBar.Screen name="Home" position="left" component={({ navigate }) => ( <HomeStackNavigator /> )} />

My HomeStackNavigator.js
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Transactions" component={TransactionsScreen} />

I hope you understand. Thank you

from react-native-curved-bottom-bar.

threeng0227 avatar threeng0227 commented on June 15, 2024

I have the same problem as you, but I don't have a solution, I hope someone can help me, thank you.

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on June 15, 2024

https://github.com/hoaphantn7604/react-native-template-components
You can refer to the way that I navigate.

from react-native-curved-bottom-bar.

buscanopaul avatar buscanopaul commented on June 15, 2024

Hi @hoaphantn7604, Do you have unmountOnBlur options on the CurvedBottomBar.Screen? I want to reset the stack navigator every time I want to click the bottom icons.

Example:
<CurvedBottomBar.Screen name="Home" position="left" component={({ navigate }) => ( <HomeStackNavigator /> )} // unmountOnBlur={true} // options={{unmountOnBlur: true}} />

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on June 15, 2024

Hi @hoaphantn7604, Do you have unmountOnBlur options on the CurvedBottomBar.Screen? I want to reset the stack navigator every time I want to click the bottom icons.

Example: <CurvedBottomBar.Screen name="Home" position="left" component={({ navigate }) => ( <HomeStackNavigator /> )} // unmountOnBlur={true} // options={{unmountOnBlur: true}} />

Hi @buscanopaul,
Can you describe your request in more detail?

from react-native-curved-bottom-bar.

yugg98 avatar yugg98 commented on June 15, 2024

Cant add more than 3 CurvedBottomBar.Screen

from react-native-curved-bottom-bar.

hoaphantn7604 avatar hoaphantn7604 commented on June 15, 2024

This issue has been resolved in version 2.0.0.

from react-native-curved-bottom-bar.

KarthiKeyan05046 avatar KarthiKeyan05046 commented on June 15, 2024

@hoaphantn7604 Mr Admin! Kindly help me to solve the issue.
i want more detailed answer for issue raised by @buscanopaul. Instead of click the back button to reset the nested stack navigator. I want to reset it when I click the home icon again. Just like the default react navigation bottom tab behavior.
this is one of the issue i hassle to use this library but i love this library can you add default navigation behaviour reset the nested stack navigator thankyou

from react-native-curved-bottom-bar.

MFoxx avatar MFoxx commented on June 15, 2024

@hoaphantn7604 Mr Admin! Kindly help me to solve the issue. i want more detailed answer for issue raised by @buscanopaul. Instead of click the back button to reset the nested stack navigator. I want to reset it when I click the home icon again. Just like the default react navigation bottom tab behavior. this is one of the issue i hassle to use this library but i love this library can you add default navigation behaviour reset the nested stack navigator thankyou

Hi, have you managed to fix this, or find a workaround ?

from react-native-curved-bottom-bar.

KarthiKeyan05046 avatar KarthiKeyan05046 commented on June 15, 2024

from react-native-curved-bottom-bar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.