blizve0 Posted September 25, 2021 Share Posted September 25, 2021 Hi Anyone Reading This , Thanks in Advance. I Recently Started Learning React and Started off with Function Components and Am Unable to Convert This Code to Functional Component. Codepen Link is Above The Very First Class Component named Particles() which is a Class Component and I am Not Able to Convert it. Alos Link to CodeSandBox if you Prefer that https://codesandbox.io/s/aerosols-ir8lf On the Very top Level of the File Structure there is a File particle.js Quote particle.js  Anyones Help with React and GSAP Expertise is Appreciated. I Really Need it in Functional Component Only. Thank You See the Pen jOweJxv by blitzve0 (@blitzve0) on CodePen Link to comment Share on other sites More sharing options...
OSUblake Posted September 25, 2021 Share Posted September 25, 2021 My suggestion would be to keep it as a class. Don't break something that isn't broken. Function components just make animation code harder to follow and reason about. If you really want to continue forward, then I would suggest go through our React Guides first as they are mostly focused on function components.   2 Link to comment Share on other sites More sharing options...
OSUblake Posted September 25, 2021 Share Posted September 25, 2021 13 minutes ago, blizve0 said: The Very First Class Component named Particles() which is a Class Component and I am Not Able to Convert it.  And that's not a component. It's just a normal JavaScript class and would work the same even if you didn't include React, so leave it as is.  A class component extends React. class MyComponent extends React.Component { }  2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now