A Short Guide to Component Naming

by Angela Fisher, Front-end Developer

1. Brevity is Key

Time is scarce, don’t waste it typing out long, descriptive component names. One approach is to give them short, cryptic names that only you will understand.

Need a button? Call it "btn". A modal? How about "md"? You’ll save precious minutes per day and you’ll get the added benefit of being the only person in the codebase who knows where anything is. This is called job security.

2. Rank High in Search

When working in large repos with lots of collaborators, it’s important that your component ranks high when people search for anything.

One way to stand out is to include all the possible search terms in your component name. Instead of “SignInButton” you might want call it “SignInButtonAuthenticationCookieUserLogIn” which will ensure that it is returned in almost any related search result.

3. Mix Languages

If you work remotely, it’s likely you are on a global team and yet all your components have English names. This slows down your non-english colleagues considerably so you should allow them to use their native tongue when naming components.

You can create an index file that maps all the different languages within your repo. Need a dropdown? Look for “Desplegable”. A form? Search “Форма”. You’ll learn multiple new languages while being more inclusive to your colleagues.

More articles

The Future of Web Development: Our Predictions for 2023

Let’s explore the latest trends in web development, and regurgitate some predictions we read on X for how they will shape the industry in the coming year.

Read more

3 Lessons We Learned Going Back to the Office

Earlier this year we made the bold decision to make everyone come back to the office full-time after two years working from a dressing table in the corner of their bedroom.

Read more

Claim Clarity LLC

Head of Technology

Leading technology strategy and development for medical and employee compensation/insurance claims platform. Architecting scalable solutions to streamline claims processing and improve user experience for healthcare providers and insurance companies.

Tech stack

  • Typescript
  • Node.js
  • React/Next.js
  • PostgreSQL/MySQL
  • AWS
  • REST/GraphQL

Setsail Marketing

Head of Technology

Spearheaded technology initiatives for real estate tech solutions. Built and managed development teams while architecting modern web applications to enhance real estate marketing and lead generation processes.

Tech stack

  • Typescript
  • Node.js
  • React/Next.js
  • PostgreSQL/MySQL
  • AWS
  • REST/GraphQL

Nerubia Web Solutions Inc

Head of Technology / CEO

Founded and led a software development outsourcing company, overseeing both technical architecture and business strategy. Built scalable web applications and managed cross-functional teams to deliver enterprise-level solutions for various industries.

Tech stack

  • Javascript
  • Node.js
  • PostgreSQL/MySQL
  • AWS
  • Business Development

Yeehired Ltd. Lty.

Principal Architect

Architected recruitment platform solutions, designing scalable systems to connect employers with candidates. Led technical decision-making and established development best practices for the engineering team.

Tech stack

  • Typescript
  • React
  • AWS

BuildZoom Inc

Lead Engineer

Led engineering efforts for home improvement and building permits platform. Developed complex systems to streamline contractor verification, permit tracking, and project management for homeowners and contractors.

Tech stack

  • Ruby on Rails
  • MySQL
  • AWS

Alliance Software Japan

Lead Software Engineer

Led software development projects for outsourcing clients across various industries. Managed development teams and delivered enterprise-level applications while establishing quality assurance processes and development methodologies.

Tech stack

  • Java
  • PHP
  • Zend Framework
  • Javacript
  • SQL Server
  • Oracle
  • C#