Saketh Kowtha
Articles by @sakethk

Articles by @sakethk

React refactor code #1

Saketh Kowtha
·Jul 25, 2021·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Actual code :

Actual code.png

Refactor stage 1 (Make larger components in to small by creating small reusable components):

Refactor stage 1.png

Refactor stage 2 (Don't use inline functions) :

Refactor stage 2.png

Refactor stage 3 (Give proper naming to components, functions and variables):

Refactor stage 3.png

Refactor stage 4 (Use spread and rest operators when you want pass multiple props to component): Refactor stage 4.png

If you feel this content is useful please share this article and give your reaction.

Thank you!!!

Follow me on

Linkedin :

Twitter :

Github :

Share this