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

239
Views
TypeError: renderizar no es una función. (En 'render(newValue)', 'render' es una instancia de Object)
import{ React, useContext} from 'react'; import { Button, View, Text } from 'react-native'; import { NavigationContainer, useNavigation ,useRoute } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import { LoginContexts } from '../Contexts/LoginContexts'; function Screen2() { const {getEmail} = useContext(LoginContexts); return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> <LoginContexts.Consumer > <Text>{getEmail}</Text> </LoginContexts.Consumer> </View> ); } export default Screen2;

Esta es mi parte del consumidor en la que quiero mostrar el texto que está presente en getEmail en la Vista de texto. por favor ayuda a resolver este problema.

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

0

El problema es que el componente LoginContexts.Consumer espera una función de representación.

Contexto.Consumidor

 <MyContext.Consumer> {value => /* render something based on the context value */} </MyContext.Consumer>

El gancho useContext es el consumidor, elimine el componente LoginContexts.Consumer .

 function Screen2() { const {getEmail} = useContext(LoginContexts); return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> <Text>{getEmail}</Text> </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!