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

154
Vistas
Destructuring props not working in React JS storybooks

I am missing something here when I destructure my props. I am writing a story book but the issue seems like I am doing something wrong with destructuring.

This is my component

export function WrapTitle ({title,children}) : TitleProps & ChildrenProps){
 return (<>h1>{titles}</h1> {children}</>)
}

So in Stories When I pass like this it's not working

<Wraptitle {...args}><Wraptitle>

How I pass the args is (This is a storybook)

WithTitle.args = {
 title:'The is title'
}

and whenI pass like this its working

<Wraptitle title = {"This is header"}><Wraptitle>

Am I missing anything here

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

0

You have to write props.PROPERTY sintax, this will work:

export function WrapTitle (props) : TitleProps & ChildrenProps){
 return (<>h1>{props.title}</h1> {props.children}</>)
}
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