
I've been writing React code as an engineer at Palantir for the past 5+ years.
These are the 17 tips I wish someone had shared with me when I was ...
For further actions, you may consider blocking this person and/or reporting abuse
I agree with almost everything, except I did find that taking the time to learn or study React before diving into making a project helped me, personally. I have been going through Code Academy courses (1-2 hours max usually) before attempting to use a new technology in a project and finding that it helps me at least understand the foundations better, which in turn help me troubleshoot issues in my project better since I actually understand what I'm doing and not just trying to copy + paste from stack overflow ( I still do this, but I understand why I'm doing it :) ).
Oh ๐ฏ.
I myself read some of the react docs and watched some frontendmasters courses to gain confidence.
I think at some point I needed to stop pursuing more courses and just start building and learn along the way!
Fair! Tutorial hell is real.
Solid tips right here, mate! Keep up the awesome job!
Thanks Madza ๐
Excellent write-up!!!
I strongly agree with many of the points here, specifically learn JavaScript before React, building projects in general (this builds confidence), leveraging Typescript asap for UI, using ONLY trusted libraries (this is EXTREMELY IMPORTANT as with my company they have a source to pull security reviewed / approved resources), optimize bundle size and lazy loading (I have to work more on this myself), and use React built-in state management (this can get complex and mess up your application if you don't use it correctly).
What I wanted to add here is what frustrates me about the lack of education when persuaing bachelor's degree (in my experience): always add testing in some sort of form to align to new features. Of course this can add additional work and time to a project and future changes.
This validates important business logic which is the whole purpose of adding new features.
Secondly I would mention also understanding how browser tests work with Selenium (or a similar technology).
Of course, I'm a mid-level systems developer, but there is always something new or a better way to do work in the computer science field.
And third, I would say when having Typescript implemented, I've enjoyed using code generators to scan swagger pages to add existing endpoints and types into the project. If there is a better practice for this process, I would like to understand this more.
My experience thus far has been around manually writing this all up instead of generating the code which can reduce turn-around time to deliver new features.
Thanks a lot! I am glad we agree on many different points.
Yes, testing is always good. However, the importance depends on your situation. If you're a startup struggling to stay alive and want to test a product quickly, it may not be a priority. Conversely, if you have code critical to many other apps, it is "criminal" not to test it ๐ .
I don't know how browser tests work with Selenium. I only use Cypress to write the tests, but I imagine it would be helpful knowledge.
Yes! My backend also automatically generates typescript types: it is life-changing.
Great tips! Really loved the focus on "Make time for refactoring." By the way, weโre kicking off 2025 with the launch of Exocoding for React devs. Itโs free and makes generating React/JS code super efficient, a great addition to streamline workflows! ๐
Iโd love to hear your thoughts or any feedback you might have!
Thanks a lot! Very cool project idea ๐
Awesome! list, and thanks for sharing. I advise the same to my junior developers, that always make sure to master JavaScript even before jumping to other libraries and end up writing code that you don't know how they work.
Thanks a lot!
Super glad we agree ๐
nice one.
Thanks!
Thanks ๐
Another important tip and a really common mistake among juniors, learn how to use correctly a useEffect. The useEffect hook is no always necessary and is really easy to use it wrong or use it when it is unnecessary
100%
You should avoid this hook by default!
The first one is absolutelly true, i've started to learn Vue before JS and well... too much scars to say xD
Ahaha same here! I struggled with react for a long time because I didnโt know JS
Helpful article, Ndeye! Thanks for sharing๐
Thanks Shefali ๐
It's so refreshing to read an article with actual good advice! ๐ Strong agree with every single point!
Thanks a lot Rense!
It is my pleasure ๐
Great tips!
Thanks ๐
Really helpful tips, even for experienced devs, is always good to remember the don'ts
Thanks!
Great ๐๐
Thanks ๐
10000% I needed these tips about 8 years ago. I hope these tips find someone who is snuggling as I was when I first started.
Thanks a lot! I am super glad to hear I am not alone ๐
This is awesome! Couldnโt agree more!
Thanks Marisol ๐
Just amazing brother, and also for making book free๐, and in addition, I found all articles writer by you at that site, when I'm free I'll read and will review ๐
Thanks Wizard!
That is my pleasure ๐
I'm not sure about number 7. Would you so kindly elaborate on that?
Hello Gisele,
So I recommend grouping related assets of a component (like in the example here => dev-to-uploads.s3.amazonaws.com/up...)
This is better than having them spread in different folders
Great article!
Thanks ๐
Extra score for mentioning The Pragmatic Programmer and Uncle Bob ๐ Regarding state management, I'd add to first try Zustand
Thanks Aleksei! Never used it but I heard good things ๐
I love to see a really good list about React. Especially I like the focus on vanilla and basement as first step.
Super glad you like it Arol ๐
Great post! loved it. ๐
Thanks ๐
Awesome tips.
Thanks!
Awesome,,i loved it
Thanks ๐
Great tips!! Thanks!!
I think these are quite good recommendations. Thanks. I try to follow most of them and got into some of the traps you mentioned before.
I am super glad you like them!
Unfortunately I also did ๐
amazing
Thanks Muhammad ๐
You mention react-router in your simple list. Maybe wouter instead?
Oh never heard of it before
Highly recommend ๐
reddit.com/r/reactjs/comments/112z...
Interesting. Thanks for sharing. It is nice to see alternatives. However react-router is so well-known and tested and nice with the last update that I prefer to just recommend it.
Makes sense. I think the common theme in their history is churning through breaking changes for many years now, so even if it's well tested, users are burning time keeping up.
That is definitely a valid concern ๐
All great points. If I may add one more: donโt use JavaScript at all if you donโt need to.
HTML and CSS have some great native functionalities that you donโt need to replace with JavaScript. For example, you can make a fully functional accordion group using CSS to style a series of details/summary tags. You can also now make a modal that pops open and closes using the dialog tag, no scripting needed,
It might seem counter-intuitive to say that you shouldnโt use JavaScript when weโre talking about developing a React app, literally made with JavaScript, but every feature that you write using scripting means not only increasing the surface area of your app, but also increasing the code that you have to cover with tests.
Use native HTML whenever you can. That also means using an anchor tag if you have something that acts like a link, and a button tag if youโre making something that acts like a button.
Youโll thank me later!