I recently got to know about Particle.js and wanted to use it on my Reactjs application.
I installed it using the command mentioned just below:-
npm install react-particles-js
And it got installed successfully. I checked it in node-modules folder and found it that it has installed properly.
Now, comes the App.js
import React from 'react';
import Navigation from './components/Navigation'
import {BrowserRouter as Router,Route} from 'react-router-dom'
import * as ROUTES from './constants/routes'
import Landing from './components/Landing'
import Home from './components/Home'
import SignIn from './components/SignIn'
import SignUp from './components/SignUp'
import PasswordForget from './components/PasswordForget';
import Particles from 'react-particles-js';
function App() {
return (
<div className="App">
<Router>
<Particles></Particles>
<Navigation />
<Route exact path={ROUTES.HOME} component={Home} />
<Route path={ROUTES.SIGN_IN} component={SignIn} />
<Route path={ROUTES.SIGN_UP} component={SignUp} />
<Route path={ROUTES.LANDING} component={Landing} />
<Route path={ROUTES.PASSWORD_FORGET} component={PasswordForget} />
</Router>
</div>
);
}
export default App;
Here, is what the output looks like
Also, I want the Particles-js to work like a proper background. So, that it comes in Sign-in, sign-up, and home components too.
Please help me. I tried adding parameters inside and it still didn't work.