VincentGarreau / particles.js

A lightweight JavaScript library for creating particles
https://vincentgarreau.com/particles.js/
MIT License
29.14k stars 4.84k forks source link

Particles and React #213

Closed NoelAnnParisi closed 7 years ago

NoelAnnParisi commented 7 years ago

Let me start by saying I love this library! I am trying to get this to work with React. I'm calling particlesJS.load('particles-js', '../assets/particles.config.json', function() { console.log(callback - particles.js config loaded'); }); inside the componentDidMount ion my Main container, but am getting this error _particles2.default.load is not a function in my console. The package is downloaded and imported in on my file.

In my HTML file, I've given the body an id of particles-js (so as not to conflict with the div id of app for React in the body)

I would love any suggestions! Thanks so much :)

NoelAnnParisi commented 7 years ago

and my JSON code is in the file referenced in the function

NoelAnnParisi commented 7 years ago

Found your other library! Thanks :)

wahlforss commented 6 years ago

Which library?

prayatna commented 6 years ago

maybe this one https://github.com/Wufe/react-particles-js ?