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

209
Views
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 answers
Answer question

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 Report

0

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

about 4 years ago · Juan Pablo Isaza Report
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!