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

194
Vistas
Why doesn't Tailwind "focus:" style activate with the default state hook?

I'm using state hooks to create a feature banner. Everything works except when the page loads the tailwind "focus:" styling doesn't activate until I actually click one of the buttons, even though the state hook is set to (autoProto).

//page function
const Page = ({ data }: Props) => {
  const { data: cardioDI } = data.prismicCardioDi
  const [feature, setFeature] = useState(autoProto);

//buttons to change the state

<button className="w-full overflow-hidden z-40  sm:text-base lg:text-lg text-white hover:text-yellow-600 focus:text-yellow-600" onClick = {() => setFeature(autoProto)}>Automatic Protocolling</button>

<button className="w-full overflow-hidden z-40   sm:text-base lg:text-lg text-white hover:text-yellow-600 focus:text-yellow-600" onClick = {() => setFeature(nlg)}>Natural Language Generation</button>
about 4 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 Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda