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

179
Views
Gancho de estado de reacción, el estado no se actualiza

Tengo un texto que simplemente quiero resaltar usando un paquete de reacción simple llamado 'react-animarker'. He intentado usar useState hook porque quiero actualizar dinámicamente la velocidad de la animación como se muestra. Sin embargo, la duración no cambia como yo quiero. Pero en la consola, se muestra como cambiante. ¿Alguna idea de por qué?

Enlace al paquete React: https://github.com/ramonmetzker/react-animarker

 import React, {useState} from 'react' import {Mark} from 'react-animarker' const Highlightx = () => { const [speed, setSpeed] = useState(5) const handleClick = () => { setSpeed(20) console.log(speed); } return ( <> <Mark duration={speed}>Highlightx</Mark> <button onClick={handleClick}>Hello</button> </> ) } export default Highlightx

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!