Particles.js: Particles and React

Created on 1 Jul 2017  路  4Comments  路  Source: VincentGarreau/particles.js

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 :)

Most helpful comment

All 4 comments

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

Found your other library! Thanks :)

Which library?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qnoox picture qnoox  路  6Comments

cosmokrust picture cosmokrust  路  5Comments

Necmttn picture Necmttn  路  6Comments

khamarzama picture khamarzama  路  5Comments

harshamv picture harshamv  路  3Comments