React refactor code #1

Actual code :

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

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

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

Re…


This content originally appeared on DEV Community and was authored by sakethk

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 : linkedin.com/in/saketh-kowtha

Twitter : twitter.com/sakethkowtha

Github : github.com/saketh-kowtha


This content originally appeared on DEV Community and was authored by sakethk


Print Share Comment Cite Upload Translate Updates
APA

sakethk | Sciencx (2021-07-25T04:09:44+00:00) React refactor code #1. Retrieved from https://www.scien.cx/2021/07/25/react-refactor-code-1/

MLA
" » React refactor code #1." sakethk | Sciencx - Sunday July 25, 2021, https://www.scien.cx/2021/07/25/react-refactor-code-1/
HARVARD
sakethk | Sciencx Sunday July 25, 2021 » React refactor code #1., viewed ,<https://www.scien.cx/2021/07/25/react-refactor-code-1/>
VANCOUVER
sakethk | Sciencx - » React refactor code #1. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/25/react-refactor-code-1/
CHICAGO
" » React refactor code #1." sakethk | Sciencx - Accessed . https://www.scien.cx/2021/07/25/react-refactor-code-1/
IEEE
" » React refactor code #1." sakethk | Sciencx [Online]. Available: https://www.scien.cx/2021/07/25/react-refactor-code-1/. [Accessed: ]
rf:citation
» React refactor code #1 | sakethk | Sciencx | https://www.scien.cx/2021/07/25/react-refactor-code-1/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.