• 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

176
Vistas
How to extract a React key from a js Date?

I'm building a schedule calendar in React and wondering what's the best way to extract a key from a js Date object? I'm already using the date-fns library but haven't seen anything about ids in their documentation.

to be clear, each date only appears once in the list so I'm looking for the fastest way to get a unique key out of a date, without using the object reference.

So far I'm using date.valueOf() or format(date, 'yyyy-mm-dd') although I feel that might be overkill since it might be recalculated every render.

about 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