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

143
Vistas
Can a state and a function have the same name?

Can I use the same name for the state and also the name of the function?

function BroadbandDeals() {
  const [broadbandDeals, setbroadbandDeals] = useState([]);
  return <div>Broadband Deals</div>;
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Technically in your case yes as they have different casing but if the casing matched then no you wouldn't be able to have the same name. Although I would say this is probably bad practice as it can make debugging more difficult as its quite common for someone to ignore the case and just read the text not noticing you have two different things named the same with different cases.

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