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

130
Views
RN-Gesture-Handler Swipeable issue with maximum call stack size exceeded

I can't make the Swipeable component work with a button. It seems like it calls all button to render the action everything I click on one of them. Any idea what is wrong here ? Thank you

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})
}

Gives me this error after logging the same message 100+ times

RangeError: Maximum call stack size exceeded

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!