Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

337
Vistas
onMouseDown and onMouseUp in react native?

I had in reactjs

render() {
  return (
    <div
      onMouseDown={this.onMouseDown}
      onMousUp={this.onMouseUp}
    >
    </div>
  )
}

For the purpose of running some code while the user was holding down the element.

How can I do the same thing in react-native? Simply turning div to View and keeping onMouseDown and onMouseUp doesn't do anything on either event, and this that I found: https://stackoverflow.com/a/44984892/3310334

<View onStartShouldSetResponder={() => true}
      onResponderStart={calledWhenTheTouchStarts}>
    <Text>Press Me!</Text>
</View>

Looks like unintentional misusage of an API

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You’ll want to use a Pressable element instead of View with a combination of onPressIn and onPressOut events. See more here

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda