₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,326,956 members, 8,428,808 topics. Date: Thursday, 18 June 2026 at 01:29 AM

Toggle theme

React Class Component Is Just A Mess - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingReact Class Component Is Just A Mess (911 Views)

1 Reply (Go Down)

React Class Component Is Just A Mess by chukwuebuka65(op): 8:44pm On Oct 07, 2022
Na so so “this” go full everywhere . Every method you write, you must bind it. If you want to use it , you must prefix it with “this”. If you has a property in class constructor, you must prefix it with “this”. If you want to use it, same . I don’t event want to talk about properties inside “this.state”. I keep forgetting to add “this.state” when I want to use them. I going to switch back to function components.
Re: React Class Component Is Just A Mess by LikeAking: 8:47pm On Oct 07, 2022
chukwuebuka65:
Na so so “this” go full everywhere . Every method you write, you must bind it. If you want to use it , you must prefix it with “this”. If you has a property in class constructor, you must prefix it with “this”. If you want to use it, same . I don’t event want to talk about properties inside “this.state”. I keep forgetting to add “this.state” when I want to use it. I going to switch back to function components.
React na good non sense.
Re: React Class Component Is Just A Mess by chukwuebuka65(op): 9:09pm On Oct 07, 2022
LikeAking:
React na good non sense.
I don’t have problems with the function components, it’s just the classes.
I believe function components are going to replace the class components
Re: React Class Component Is Just A Mess by tensazangetsu20(m): 9:21pm On Oct 07, 2022
Hardly anyone uses class based components cause they are verbose but learn them incase you need to work with legacy react code.
Re: React Class Component Is Just A Mess by chukwuebuka65(op): 10:26pm On Oct 07, 2022
tensazangetsu20:
Hardly anyone uses class based components cause they are verbose but learn them incase you need to work with legacy react code.
That’s the only reason that I am learning it.
Re: React Class Component Is Just A Mess by LikeAking:
chukwuebuka65:
I don’t have problems with the function components, it’s just the classes.
I believe function components are going to replace the class components
Func comps are the future.
Re: React Class Component Is Just A Mess by Edipet(m): 10:47am On Oct 08, 2022
chukwuebuka65:
Na so so “this” go full everywhere . Every method you write, you must bind it. If you want to use it , you must prefix it with “this”. If you has a property in class constructor, you must prefix it with “this”. If you want to use it, same . I don’t event want to talk about properties inside “this.state”. I keep forgetting to add “this.state” when I want to use them. I going to switch back to function components.
please is hp elite book a good system for programming?
Re: React Class Component Is Just A Mess by chukwuebuka65(op): 1:24pm On Oct 08, 2022
Edipet:
please is hp elite book a good system for programming?
Yea, core i5 , 8 gb and an ssd storage will be preferable
Re: React Class Component Is Just A Mess by Zabiboy: 1:33pm On Oct 08, 2022
chukwuebuka65:
Na so so “this” go full everywhere . Every method you write, you must bind it. If you want to use it , you must prefix it with “this”. If you has a property in class constructor, you must prefix it with “this”. If you want to use it, same . I don’t event want to talk about properties inside “this.state”. I keep forgetting to add “this.state” when I want to use them. I going to switch back to function components.
Why are you still using classes?
Is it because of state management?
Also, i dont think you need to bind anymore when using arrow functions
Re: React Class Component Is Just A Mess by chukwuebuka65(op):
Zabiboy:
Why are you still using classes?
Is it because of state management?
Also, i dont think you need to bind anymore when using arrow functions
Using arrow functions is less memory efficient than traditional functions that’s why I use traditional functions.
Re: React Class Component Is Just A Mess by Sleekcode: 3:58pm On Oct 08, 2022
Total rubbish


I've never used it since I started using REACT


unnecessary confusing and rubbish

It's a blatant waste of time and should be immediately abolished




React official website itself said functional components is the future but still making some docs with class based components




Class based components should have been banned by now!
Re: React Class Component Is Just A Mess by Sleekcode: 3:58pm On Oct 08, 2022
LikeAking:
Func comps are the feature.
Future
Re: React Class Component Is Just A Mess by Ajibade123(m): 10:46pm On Oct 08, 2022
it not really different from the functional component though but why not functional component direct
1 Reply

Programming Is just Like Playing FootballUnderstanding The Concepts Of View, State, Props, Lifecycle & Component In ReactEmbed Youtube Video In React Native Android Using Webview Component234

Join My TeamMicrosoft Just Released NET MAUI Extension For VS CodeUnleash Playwright On Replit - Python Web Automation Made Easy!