Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

127
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda