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

117
Views
¿Cómo puedo manejar este tipo con un solo parámetro?

Tengo un modelo de estos:

 image: string; redirect_option: 'PROFILE' | 'PRODUCT'; redirect: Product | User;

Ahora renderizo la lista y quiero agregar una función:

 const handleNavigateToRedirectedOption = ({ redirected_option, params }: { redirected_option: 'PROFILE' | 'PRODUCT'; redirect: Product | User;}) => { redirected_option === 'PROFILE' && navigation.navigate('UserProfile', params); }; const renderItem = ({ item }) => ( <Pressable onPress={}> <Text>List</Text> </Pressable> );

Ahora me sale este error:

 Argument of type 'IProduct | CurrentUser' is not assignable to parameter of type 'CurrentUser'. Type 'IProduct' is missing the following properties from type 'CurrentUser': user_id, profile_image,

Conozco el problema, pero no sé cómo puedo resolverlo. esto viene en la navegación... parámetros

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

0

Si solo está buscando una corrección de sintaxis:

 navigation.navigate('UserProfile', params as CurrentUser);

Pero sí, el problema real podría tener algo que ver con la forma en que estructura y escribe sus códigos.

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!