Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Front-end developers forgot how to store state in the URL. Everyone suffers.

919,854 Aufrufe • vor 2 Jahren •via X (Twitter)

10 Kommentare

Profilbild von K.O.O x #SailsconfAF2025
K.O.O x #SailsconfAF2025vor 2 Jahren

🤣😂😅😂 Actually most newer frontend dev weren’t taught URL fragments and query params It’s all useState these days 😂😇

Profilbild von Bret Little
Bret Littlevor 2 Jahren

Devs who don't know teaching devs who then also don't know. It's generational ignorance.

Profilbild von Chris Esplin
Chris Esplinvor 2 Jahren

She's stubborn. She's a Gemini. And of course she's spot on about the URL nav. But I take some issue with infinite scroll. It can be buggy to implement, and sometimes it's not worth it, even with IntersectionObserver. I usually advocate for pages or click-to-load when most users will never need additional pages of data.

Profilbild von Bret Little
Bret Littlevor 2 Jahren

IMO if devs can't properly do back/forth navigation restoring state, then it's better to _not_ have infinite scroll at all. Most implementations are too user hostile.

Profilbild von Tanner Linsley
Tanner Linsleyvor 2 Jahren

The energy here is💯

Profilbild von joshpuckett
joshpuckettvor 2 Jahren

Inviting her to every design review *immediately*

Profilbild von sven is your fren
sven is your frenvor 2 Jahren

This such a true statement. URL state is state management on easy mode and a great benefit for users. Imagine queries and pagination without URL state?

Profilbild von Bret Little
Bret Littlevor 2 Jahren

@svenasol It's not hard to imagine. It's everywhere! `const [page, setPage] = useState(0)`

Profilbild von Jalik
Jalikvor 2 Jahren

I've never used infinite scrolling cause it sucks... URL query params are the way to go for initializing a page with custom params. Maybe beginners were not taught that..

Profilbild von Bret Little
Bret Littlevor 2 Jahren

We also have `history.pushState` for SPAs, that no one uses! It's how we built our Pagination component to restore infinite scroll state on back/forward navigation:

Ähnliche Videos