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

202
Views
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
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!