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

211
Vistas
Particles JS on React nos properly working

I'm trying to use react-particles-js on react. When I load the page, it's not working. But when I change the color of the particle, it works! But it does not refresh the page anymore when I do changes on it. The original color was: #000, I just changed it to #000000 and started working. But when I refreshed the page, it wasn't working anymore.So I passed from the #000000 I had before to #000 again. And it worked again. So I tried to update it using window.onload(just as how I has doing it manually), but doesn't seems to be working.

window.onload = function(){
setTimeout(() => {
 particlesConfig.particles.color.value = "#000000"
console.log(
  particlesConfig.particles.color.value
)}, 1000)}

Please help. I don't really know why it only works when I change the color, but when I refresh it's not working anymore.

If you want to check my code further: code

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Particle js is deprecated now I had the exact same issue. You need to use react-tsparticles instead. it works the exact same so if you istall this and switch out your imports everything will work

about 4 years ago · Juan Pablo Isaza Denunciar

0

Try downgrade your react particlejs to version 3.4.1 it work for me.

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