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

329
Views
¿Cómo puedo arreglar eslint: error de reacción/desestructuración-asignación?

 const Container = (props) => { return ( <StyledDiv> <SmallScreenDiv>{props.children}</SmallScreenDiv> </StyledDiv> ); };

Este es mi código y el error ocurre en {props.children}
¿Cómo puedo solucionar este error de eslint?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

También puedes destruir tus accesorios de esta manera:

 const Container = ({children}) => { return ( <StyledDiv> <SmallScreenDiv>{children}</SmallScreenDiv> </StyledDiv> ); };
about 4 years ago · Juan Pablo Isaza Report

0

Hay dos soluciones para esto

  1. Deshabilite la función de desestructuración preferida en el eslint

  2. desestructura tus accesorios

     const Container = ({children}) => { return ( <StyledDiv> <SmallScreenDiv>{children}</SmallScreenDiv> </StyledDiv> ); };

o

 const Container = (props) => { const {children} = props return ( <StyledDiv> <SmallScreenDiv>{children}</SmallScreenDiv> </StyledDiv> ); };

Recomendaré usar la segunda opción.

about 4 years ago · Juan Pablo Isaza Report
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!