r/reactjs • u/timmonsjg • Dec 03 '18
Needs Help Beginner's Thread / Easy Questions (December 2018)
Happy December! βοΈ
New month means a new thread π - November and October here.
Got questions about React or anything else in its ecosystem? Stuck making progress on your app? Ask away! Weβre a friendly bunch. No question is too simple. π€
π Want Help with your Code? π
- Improve your chances by putting a minimal example to either JSFiddle or Code Sandbox. Describe what you want it to do, and things you've tried. Don't just post big blocks of code!
- Pay it forward! Answer questions even if there is already an answer - multiple perspectives can be very helpful to beginners. Also there's no quicker way to learn than being wrong on the Internet.
Have a question regarding code / repository organization?
It's most likely answered within this tweet.
New to React?
π Here are great, free resources! π
38
Upvotes
View all comments
Show parent comment
1
u/timmonsjg Dec 03 '18
No such thing.
Both of your questions are purely opinionated (imo).
It would be most efficient, but not necessary. Class components are perfectly fine to use.
Again, it would probably be most efficient, but negligible.
This is okay! Plenty of people exclusively class components or start their app off initially with class components. You can always refactor later.
This idea that functional over class components is not a huge deal. You'll see advantages such as performance gains, simplicity, and readability, BUT this should never hinder you or make you second guess yourself.
Use class components as much as you want and if you feel that you can turn a class into a functional, go for it.