Top 7 Mistakes to Avoid When Using React | Revive Coding

in #reactlast year

Today we will take a look at the 7 most common mistakes that most React developers make. At the beginning of a career, each newbie has to overcome troubles and obstacles. It brings an enormous number of advantages for both, customers and developers if they improve their coding skills at the very beginning of their carrier...

TIMESTAMPS
0:00 Introduction to mistake done by react developer.
1:37 Absence of micro-services Mistake no 1.
3:50 Direct modification of states Mistakes no 2.
7:10 String instead of a number as the argument Mistake no 3.
9:04 SetState() is asynchronous Mistake no 4.
12:25 Components name capitalization Mistake no 5.
13:54 Folders are a total mess Mistake no 6.
16:14 Pack all UI elements into one component Mistake no 7
17:24 Thank You, like subscribe share.

Some common mistakes in React development you should avoid.

  • When rendering the list, do not use the key.
  • Modify the state value directly by assignment.
  • Bind the state value directly to the value property of the input.
  • Use state directly after executing setState.
  • Infinite loop when using useState + useEffect.
  • Don't pass state variables to setState in React. ...
  • Make your React components single responsibility. ...
  • Make your side effects single responsibility. ...
  • Use ternaries instead of && in JSX.
Sort:  

Congratulations @spydo! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You distributed more than 75000 upvotes.
Your next target is to reach 76000 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

HiveBuzz World Cup Contest - Round of 16 - Recap of Day 2
Our Hive Power Delegations to the November PUM Winners
HiveBuzz World Cup Contest - Recap of the last day of the group stage.
Support the HiveBuzz project. Vote for our proposal!