React Class Component Is Just A Mess - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › React Class Component Is Just A Mess (911 Views)
| 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:React na good non sense. |
| Re: React Class Component Is Just A Mess by chukwuebuka65(op): 9:09pm On Oct 07, 2022 |
LikeAking: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:That’s the only reason that I am learning it. |
| Re: React Class Component Is Just A Mess by LikeAking: 11:10pm On Oct 07, 2022*. Modified: 8:15pm On Oct 08, 2022 |
chukwuebuka65:Func comps are the future. |
| Re: React Class Component Is Just A Mess by Edipet(m): 10:47am On Oct 08, 2022 |
chukwuebuka65: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: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: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): 3:48pm On Oct 08, 2022*. Modified: 4:06pm On Oct 08, 2022 |
Zabiboy: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: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 |
Programming Is just Like Playing Football • Understanding The Concepts Of View, State, Props, Lifecycle & Component In React • Embed Youtube Video In React Native Android Using Webview Component • 2 • 3 • 4
Join My Team • Microsoft Just Released NET MAUI Extension For VS Code • Unleash Playwright On Replit - Python Web Automation Made Easy!