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

169
Vistas
¿Cómo verificar el tipo de accesorio que pasa de un componente a otro componente en reaccionar nativo?

Estoy tratando de representar el botón de Apple en la pantalla de registro e inicio de sesión y he creado el componente para el mismo para poder reutilizar el componente en la pantalla de inicio de sesión y registro, pero necesito enviar un accesorio con el tipo de buttonType para poder procesar botón de acuerdo a la pantalla.

por ejemplo:

 <View style={{ margin: 50, marginBottom: 10 }}> <AppleSignButton buttontype={"AppleButton.Type.SIGN_UP"} /> </View>

Pero estoy recibiendo un error si estoy intentando esto.

Error: Invariant Violation: requireNativeComponent: "RNAppleAuthButtonViewManagerWhiteAppleButton.Type.SIGN_IN" was not found in the UIManager.

Componente AppleButton:

 <AppleButton buttonStyle={AppleButton.Style.WHITE} buttonType={props.buttontype} /* here if I try to replace it with "AppleButton.Type.SIGN_IN" then it outputs same error */ style={{ width: 200, height: 50, }} onPress={() => onAppleButtonPress()} />

Ahora, si simplemente reemplazo props.buttontype o "AppleButton.Type.SIGN_IN" esto por AppleButton.Type.SIGN_IN funciona bien.

Entonces, supongo que el accesorio que estoy enviando al componente está en formato de cadena, por eso aparece el mismo error.

Componente AppleButton:

 export declare enum AppleButtonType { /** * The default button, the same as `SIGN_IN`. */ DEFAULT = 'SignIn', /** * Renders the button with 'Sign in with Apple'. */ SIGN_IN = 'SignIn', /** * Renders the button with 'Continue with Apple'. */ CONTINUE = 'Continue', /** * Renders the button with 'Sign up with Apple'. * * > Note: This only works on iOS 13.2+. To check if the current device supports this, use the * provided `isSignUpButtonSupported` flag from the AppleAuth module. */ SIGN_UP = 'SignUp', }
about 4 years ago · Juan Pablo Isaza
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