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

126
Views
Problema de RN-Gesture-Handler Swipeable con el tamaño máximo de la pila de llamadas excedido

No puedo hacer que el componente Swipeable funcione con un botón. Parece que llama a todos los botones para representar la acción todo lo que hago clic en uno de ellos. ¿Alguna idea de lo que está mal aquí? Gracias

 import { RectButton, Swipeable } from 'react-native-gesture-handler'; .... cars.map((car: any, index: number) => { if(car.is_cancellable) { return( <Swipeable key={index} renderRightActions={() => { return( <RectButton style={styles.swipeable} onPress={() => cancelOrder(car.uuid)}> <Feather style={styles.icon} name="trash-2" size={32} color="white" /> </RectButton> ) }} rightThreshold={-300} key={order.uuid}> <TouchableOpacity onPress={() => selectOrder(car)}> <PortfolioOrder car={car} /> </TouchableOpacity> </Swipeable> ) }) }}) const cancelOrder = (id: string) => { console.log('press', id) cancelOrder({id}) }

Me da este error después de registrar el mismo mensaje más de 100 veces

RangeError: se excedió el tamaño máximo de la pila de llamadas

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

0

const cancelOrder = (id: string) => { console.log('press', id) cancelOrder({id})// this line is causing problem because of recursion. }
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!