Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
Reacciona nativo. Cómo pasar el estado del componente a BottomTab.Screen

Obtuve la navegación realizada con la navegación de la pestaña inferior en reaccionar nativo.

Código de ejemplo

 <BottomTab.Screen name="Home" component={RootPasswordsHandler} options={(): { tabBarIcon: ({ color }: { color: any }) => JSX.Element; headerRight: () => JSX.Element; title: string; } => ({ title: globalState.languageHandler.screenNames.HOME_SCREEN, tabBarIcon: ({ color }): JSX.Element => <TabBarIcon name="home" color={color} />, headerRight: (): JSX.Element => ( <TextInput style={styles.navStyles.input} placeholder={globalState.languageHandler.generic.FIND_PASSWORD} /> ), })} />

En el componente RootPasswordsHandler , el componente obtiene las contraseñas de la base de datos, las guarda en el estado local useState y las representa.

Me gustaría agregar una entrada as in code example above , que accederá a esos datos y filtrará la matriz de contraseñas.

¿Cómo puedo lograr eso? Soy bastante nuevo en reaccionar nativo y estoy completamente atrapado aquí.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede usar setOptions en su componente y luego acceder a ellos en BottomTab

¡Ejemplo de documentos para ver cómo se pasa el value !

 function ProfileScreen({ navigation, route }) { const [value, onChangeText] = React.useState(route.params.title); React.useLayoutEffect(() => { navigation.setOptions({ title: value === '' ? 'No title' : value, }); }, [navigation, value]); return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> <TextInput style={{ height: 40, borderColor: 'gray', borderWidth: 1 }} onChangeText={onChangeText} value={value} /> <Button title="Go back" onPress={() => navigation.goBack()} /> </View> ); }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!