Tech
I Moved My Next.js Dashboard Logic Into Postgres. My Frontend Got Boring (And That's the Point).
My dashboard had a useMemo doing arithmetic it had no business doing.
It was a Pokémon TCG Pocket collection tracker, but that part doesn't matter. What matters is that the home page needed to show three things: overall completion, completion per set, and which set you were closest to finishing. The way I'd built it, the browser was fetching every card and every owned record, then grinding through the math on each render to figure all of that out.
It worked. It also got slower and harder...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to