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

167
Views
¿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
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!