Now, before I get cancelled, let me explain π
I'm on the cusp of the boundary between Gen Y and Gen Z and I learnt React during the class component...
For further actions, you may consider blocking this person and/or reporting abuse
Great read (even as a Gen X'er).
I feel software development is going backwards but I guess that is more to do with the platform (web) whereas I coded for Win32/Win64.
I did years of OO and component re-use and encapsulation was a thing and as you mention React started this way before going, dare I say, quick and dirty.
But web dev isn't quick and dirty, its slow and painful having to have UI/API Layer/DB and having to marshall data back and forth between the 3 tiers. I (30 years ago with Delphi) I could do OO, visual inheritance, 2-tier, 3-tier, WYSIWYG development so could churn out apps way way faster than now.
Hey! Thank-you. I know what you mean, React has a very interesting paradigm where some new developers may not have ever touched OOP! Really interesting to hear your perspective, thank-you for sharing!
This was a fun return to the past, and a nice look forward!
Thank-you Jamon! Since you're one of the major players in the RN community, is there any similar trends specific to RN you have seen?
I think the new architecture and autolinking and before Expo was viable -- might make a good talk at Chain React actually.
Ooo what a great idea! Theres probably so many things I "take for granted" in RN, would definitely be very interested!
CFP is still open! ChainReactConf.com
This was a great read!
I am in the "i learned class components" group too. I wonder what the younger developers think about these differences.
I especially see the value of your opinion about testing ("The step-by-step nature of class components encouraged testing practices, as we had to address each component's lifecycle events and behaviours individually.") Testing components with multiple useEffects is a totally different journey!
Thank-you Ola! Yea i'm really hoping to open up a conversation. Any recommendations for testing multiple useEffects? π
My first thought about recommendations in this case is: run away! XD
But if we're being honest I would start by trying to build a mental model of how the component works, maybe try to write down a flow diagram. Then try to figure out what exact behaviour you're testing :) Because, as papa Dodds always says: Don't test implementation details!
( kentcdodds.com/blog/testing-implem... )
Is this a group letter? I can sign myself up under it! :D Really nice read.
One note I'd add from myself regarding the "TypeScripting our way to a stronger relationship!" - it has 2 sides - get grip of TypeScript, that's for sure, but because TS is becoming a default choice in more places everyday don't forget the basics - JS is under the hood and we all should understands how it works, so it's not all magical to us π
Absolutely great callout! Theres so many great articles on JS best practices too :)
I found this a wonderful read.
If your poking at Gen Z with the dont think just do model, I would say sadly... that your right, but not necessarily for the right reasons.
If we read into the generation that grew up with an automatic music playlist, the ability to call whenever they were running late, and entertainment choices spoon feed to them, It's not hard to say they are the dont think just do generation.
This is exactly what the hooks architecture is, It's any loosey goosey model you want, without the need to organize the lifecycle. Not necessarily bad, but definitely risky.
Wow, this post is wonderful.
So well written, empathetic, and just plain old interesting! Also, the image breaks had me cracking up. π
Really appreciate you sharing this with us! As a non-dev, it was so engaging and well written that I still found it fairly easy to follow (not to claim that I understand all the technicals, haha)... and now I feel like I've learned a little something new about how React evolved and why there is this sorta generational divide between how to do things. Thankya!
Thank-you so much for your kind words! Hopefully if you ever do give React a try you'll have some more empathetic "older" folks helping π
Nice article!
And the pre-ES6-class generation before us deserve a shout out too! π
There's something to be said about differences in testing approach that shifted massively between these generations. While now implementation details tend to be less tested, I feel coverage can be a bit more "gappy" if not careful. Or to avoid this, we tend to go overkill which requires more expensive levels of testing and more setup, which can require more maintenance in itself.
Great points! Yea I definitely think there could be a whole article dedicated to testing!
This is an incredible read! Thank you @anishamalde for taking us on this journey
Thank-you glad you enjoyed :)
Woah!! so many memories are coming back to me of early ReactJS. Thank you @anishamalde for such a fun yet full of knowledge blog for ReactJS future gen
Writing this made me realise, I definitely do not miss class components π
good good stuff. Thank you
Thank-you!!
I really hope we are on the verge of a new React generation. Server components, server actions, web components and hopefully a much larger focus on using WEB API's and progressive enhancement.
Fantastic mention! Best practices should be revisited periodically :D
Agreed 100%!
Thank you for a great read, thatβs an interesting way to look at Reactβs evolution!
Thank-you!!
It was so nice to read.
Great article! Brought me back to when I started learning react, and reminded me how painful class components could be. Not saying useEffect is better though!
Aha the love - hate relationship with hooks!