• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

172
Vistas
Practice of using <div> with component libraries (mui + react)

I am building a site based on Next.js (React | TSX) & Material-UI library. I customize some of my components, and I'd like to ask about using <div> wrappers around my components, like:

export const component = /** JSX below */

<Fragment>
  <div className={classes.root}>
    <MUIDataTable
      data={data.feed}
      columns={columns}
      options={options}
    />
  </div>
</Fragment>

Most of the components look something like that. I use divs to pass custom css style via className property. So the question is, does it ok to wrap my components, or is it not?

I have not so much experience with the front-end, so I don't know the best practices with MUI & React. Probably there is some kind of component, that I should use instead of <div>?

almost 3 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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda