0% found this document useful (0 votes)
16 views1 page

Front-End Code Refactoring Guide

Uploaded by

gokulink888
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Front-End Code Refactoring Guide

Uploaded by

gokulink888
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

refactor your code using some of the best practices you’ve learned.

Refactoring means editing


your code so that it’s easier to read and less complex.

Being able to effectively refactor code is an important skill of a front-end developer. Creating
quality code is an iterative process.

Here are a few things to ask yourself when you are refactoring your code.
•Are your class names ambiguous? 6 months from now, will you still understand what your class
name means?
•Is your HTML and CSS semantic? When glancing at your code are you able to quickly discern
structural and relational meaning?
•Are you reusing the same hex color code over and over again in your code? Would it make
more sense to refactor it into a Sass variable?
•Does your code work just as well on Safari as it does on Chrome?
•Could you replace some of your layout code with a grid system like Skeleton?
•Are you using the !important flag often? How can you fix that?

You might also like