Knowledgebase

Common Frontend Anti-Patterns Print

  • frontenddevelopment, frontend, performance, errors, guide, howto, solution, zillionkinghost
  • 0

What repeatedly goes wrong.

ADDING A FRAMEWORK A CONTENT SITE DID NOT NEED

REBUILDING NATIVE ELEMENTS

Losing keyboard handling and accessibility.

PUTTING EVERYTHING IN GLOBAL STATE

Making the application difficult to reason about.

TREATING SERVER DATA AS OWNED STATE

Producing manual loading flags and stale data everywhere.

STORING DERIVED VALUES

Creating copies that diverge.

USING EFFECTS FOR THINGS THAT BELONG ELSEWHERE

Producing extra renders and subtle bugs.

MEMOISING WITHOUT MEASURING

Complexity for no benefit.

ADDING DEPENDENCIES CASUALLY

Each downloaded, parsed and executed by every visitor.

DESIGNING ONLY THE SUCCESSFUL STATE

Empty, error and loading discovered in production.

NO PERFORMANCE BUDGET

Degradation nobody notices until it is severe.

TESTING IMPLEMENTATION RATHER THAN BEHAVIOUR

Tests that break on every refactor.

NO CONVENTION FOR WHERE THINGS LIVE

WHAT PREVENTS MOST OF THESE

Keeping state minimal, starting from native elements, measuring before optimising, and agreeing conventions early.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot