Crowdsourcing: Unleashing the Power of Collective Intelligence
January 23, 2024
SAGE Hai to Mumkin hai..Welcome to SAGE Radio 89.6
February 1, 2024
Show all

HOW PRETTIER IS REACT?

I believe that best part of React is that it is more optically attractive than Angular JS due to its easy and flexible design.

Why prettier?

It helps us to avoid errors in our code . It automatically arrange our code and helps to identify concerns easily before they become difficulty.

What is prettier?

Prettier is a code formatter that is helpful for consistent formatting for difficult editors and coding languages. It sequence our code automatically to make it more clear and legible.

The languages which it supports are Javascript, Typescipt, JSX, Angular, CSS,HTML, etc. It supports wide range of file formats & used as a discrete tool making it more versatile.

Prettier is more advantageous as compared to other formatting tools because it formats the code itself without any physical guide. There are number of reasons why I would like to use prettier—

  • It can help ignore mistakes of semicolon
  • Maintain consistency in
  • Contains features like error checking and maintain

Prettier has some specific set of rules to format the code. For example: we can ask prettier to format a code that is wrapped in tag or parenthesis.

How to install & use prettier?

  1. Press “ Ctrl + Shift +X ” to access the extensions section of
  2. Search for “ Prettier-Code formatter ”
  3. Hit the “ install ” button, then press the Reload

Conclusion

As it automatically formats the codebase without manual handling and points errors at an early stage, it is mostly used formatting tool than others.Across the whole codebase prettier ensures a uniform style, that is why it is considered as only style guide that is automatic and comes with unique features.

 

Writer of the article 

Name: Nidhi Singh

Department: Institute of Computer Application Sage University, Indore

 

Dr Sanjay Dubey
Dr Sanjay Dubey
Academician, Researcher, Counsellor

Comments are closed.