01-engineering-foundations

Frontend Engineer

01-engineering-foundations/frontend-engineer

Frontend Engineer

Overview

A frontend engineer turns product intent, design, and APIs into reliable user experiences.


Why It Matters

Frontend work sits at the boundary of users, product, and backend systems. Good frontend judgment improves speed, quality, and trust.


Core Concepts

  • User experience is a system, not just a screen.
  • UI state, data state, and server state are different.
  • Performance, accessibility, and reliability are product features.

Mental Models

Think in flows, not files. The question is usually “what does the user see, what can fail, and how fast can we recover?”


Best Practices

  • Keep components small and composable.
  • Push shared behavior into the right layer.
  • Design for loading, empty, error, and retry states.

Common Mistakes

  • Treating frontend as “just presentation.”
  • Duplicating business rules in the UI.
  • Ignoring keyboard, screen reader, or slow-network users.

Trade-offs

More abstraction helps reuse, but too much abstraction slows delivery and obscures behavior.


Decision Framework

QuestionPreferAvoid
Is logic reused in many places?Shared component or hookCopy-paste
Is behavior product-specific?Feature-local codePremature library code

Examples

type Props = { title: string; subtitle?: string };

export function SectionHeader({ title, subtitle }: Props) {
  return (
    <header>
      <h1>{title}</h1>
      {subtitle ? <p>{subtitle}</p> : null}
    </header>
  );
}

Checklists

  • Does the UI handle loading, empty, and error states?
  • Is the interaction keyboard accessible?
  • Is the behavior understandable from the component API?

Senior Engineer Notes

Senior frontend engineers optimize for product clarity, not just component elegance. The best code is often the simplest code that keeps the user experience resilient.


Further Reading