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

111
Views
¿Cómo dejar que el evento de pulsación larga aparezca en reaccionar nativo?

¿Cómo hago para que el evento de pulsación prolongada se llene de forma que se impriman tanto el activado 1 como el activado 2?

 <Pressable style={styles.press2} onLongPress={() => { console.log('triggered 2') }}> <Text>Look Down</Text> <ScrollView> <Pressable style={{styles.press1}} onLongPress={() => { console.log('triggered 1') }}> <Text>click me</Text> </Pressable> </ScrollView> </Pressable>

Leí esta respuesta pero realmente no la entiendo.

Editar: ¿hay alguna forma de resolver esto sin importar otro paquete?

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

0

No creo que esto sea fácilmente factible sin un truco de habilitación 'hacky'. Yo personalmente usaría un LongPressGestureHandler de react-native-gesture-handler .

Tienen un accesorio de manejadores simultaneousHandlers que hace que varios controladores funcionen al mismo tiempo, por lo que podría hacer algo como esto:

 const childHandlerRef = useRef(null); <LongPressGestureHandler simultaneousHandlers={childHandlerRef}> <View> <LongPressGestureHandler ref={childHandlerRef}> // other components </LongPressGestureHandler> </View> </LongPressGestureHandler>

Puedes leer más sobre esto aquí .

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!