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

157
Vistas
What's wrong with using object as a PropType?

I see that Airbnb's style guide includes forbid-prop-types for type object. (as can be seen here)

Can someone explain why I would want to forbid the use of PropType.object?

Is it just that it's too vague? And if so, how can I be more specific?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Is it just that it's too vague?

Yes

And if so, how can I be more specific?

Basically, they're saying if you use object you should really be using shape so you can specify what the key/values of the object are.

 // An object taking on a particular shape
  myObject: React.PropTypes.shape({
    color: React.PropTypes.string,
    fontSize: React.PropTypes.number
  }),
over 4 years ago · Santiago Trujillo 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