DEV Community

Cover image for 10 Tips & Tricks that will make you a better ReactJS Dev

10 Tips & Tricks that will make you a better ReactJS Dev

Simon Holdorf on October 02, 2019

Introduction Alright folks, it is time for another article providing with you some knowledge you can immediately use to improve your Rea...
Collapse
 
joeberetta profile image
Joe Beretta

In the end I've understood Hooks. Thank you very much!
P.s. trick with JSX conditions is really cool)

Collapse
 
simonholdorf profile image
Simon Holdorf

Glad it helped you! :)

Collapse
 
daniel15 profile image
Daniel Lo Nigro • Edited

Note that hooks make a lot of higher-order components unnecessary. A lot of what was previously done using HOCs can now be done using hooks, as you can make your own custom hooks (they're just functions). Libraries like Relay are moving towards hooks, and the Redux use case you mentioned could also be done with hooks.

For testing, I'd personally recommend react-testing-library over Enzyme: testing-library.com/docs/react-tes...

Collapse
 
simonholdorf profile image
Simon Holdorf

Valid points - thanks for sharing !

Collapse
 
rahzun profile image
Rahzun

I'm very new to React. Since I've been learning JS functional programming from before, some of the implementations in React is not so difficult to understand.
But I'm finding the concepts like "Hooks", "Redux", "ContextAPI" needs more practice to get hang of it. Thank you so much for the article, really helped me understand the implementations.

Collapse
 
simonholdorf profile image
Simon Holdorf

Understanding functional programming in JavaScript will always help. Frameworks will come and go, but JavaScript will stay. Glad you like it :)

Collapse
 
nora_init profile image
Nora Georgieva

These tips really help organize the huge mountain of concepts that is React into a manageable number of key ideas. As someone who's trying to understand React better, I appreciate it! <3 If I may return the favor, my team recently created a post with a similar purpose, listing the top productivity tips of contributors such as Kent C. Dodds, vjeux and Emma Wedekind. I think we would make a powerful combo: Productivity Tips from 25 React Experts

Collapse
 
danondso profile image
Dublin Anondson

The Context API and HOC sections were awesome! Thanks for putting this post together.

Collapse
 
malithmadhushan profile image
malith madhushanka

Thanks.😊

Collapse
 
simonholdorf profile image
Simon Holdorf

Always:)

Collapse
 
jonathan_zuniga profile image
Jonathan Zúñiga

Thank you, I will apply your tips in my next projects. 👍

Collapse
 
simonholdorf profile image
Simon Holdorf

Cool :)

Collapse
 
nachiketwattamwar profile image
nachiketWattamwar

Nice article. Helped me understand Hooks better!