Comment

Comment by MetaWhirledPeas

> It's awfully nice if you used Page Object Model and you have a single-point-of-truth to fix it.

I like fewer sources of truth, but I dislike trying to force everything into a "page" analogy. Try maintaining a library of commonly-used actions instead, like:

  logIn()
  registerNewUser()
  addItemToCart()
And maybe group them thematically.

The underlying intent is the same... reduce duplication, improve organization. But you won't be stuck wondering "what page am I on now?" in a single page application, or rifling through folder upon folder of nonsensical "page" files.

And even in the worst case, Ctrl-Shift-H still works.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton