React hooks caused this because by default there’s no sensible place to fetch data.
So unless you know ahead of time, any complex single page ends up with complex and hard to track network requests.
The solution is really simple: pull data out of the view layer and make it a first class citizen.
—
An exercise: imagine you’re building a tui instead of a web app, but you’re forced to use the exact same code for app state and data fetching… what would that code look like?
It prevents the umpteenth reinvention of an incomplete fetch state machine, which is probably the number one most consistent frontend bug I encounter.
- yes channels are based on categories(science, travel, documentaries, etc.)
- yes there is a schedule, each video is scheduled to play at a certain time, so everyone is watching the same exact thing.
1. unique urls per channel so I can send it to a friend and say "check this out" 2. up + down keys for changing channels