Closed godspeedgld closed 6 years ago
My step is follow :
1 create react project using create-react-app , 2 npm install react-particles-js. 3 import lib using import Particles from 'react-particles-js'; 4 add to app component
But when I use npm start. the page is blank. no particle effect show.
My App.js is follow: ` import React, { Component } from 'react'; import './App.css'; import Particles from 'react-particles-js';
class App extends Component { render() { return ( ); } } export default App; `
My package : { "name": "testpaticle", "version": "0.1.0", "private": true, "dependencies": { "react": "^16.5.2", "react-dom": "^16.5.2", "react-particles-js": "^2.3.0", "react-scripts": "1.1.5" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } }
{ "name": "testpaticle", "version": "0.1.0", "private": true, "dependencies": { "react": "^16.5.2", "react-dom": "^16.5.2", "react-particles-js": "^2.3.0", "react-scripts": "1.1.5" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } }
My step is follow :
1 create react project using create-react-app , 2 npm install react-particles-js. 3 import lib using import Particles from 'react-particles-js'; 4 add to app component
But when I use npm start. the page is blank. no particle effect show.
My App.js is follow: ` import React, { Component } from 'react'; import './App.css'; import Particles from 'react-particles-js';
class App extends Component { render() { return (
);
}
}
export default App;
`
My package :
{ "name": "testpaticle", "version": "0.1.0", "private": true, "dependencies": { "react": "^16.5.2", "react-dom": "^16.5.2", "react-particles-js": "^2.3.0", "react-scripts": "1.1.5" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } }