~/talk

Why File-based Routing Sucks and Why You Should Use It

Talkat React Miami 2025 · 2025-04-17..04-18· [react, frontend-architecture]
slides:none on file

Argues that file-based routing has persistent tradeoffs across Next.js and Remix but remains useful for automatic code-splitting. Demonstrates a JS config middle ground using routes.ts that composes existing FS routes, uses relative() to map nested team folders, adds a dev-only components page via process.env.NODE_ENV so it disappears from production builds, applies a prefix(lang?) helper for i18n, and a createCrud util (Rails-inspired) to emit standard CRUD routes — demos refresh and build as expected, showing the approach works.

AI-written summary · about

  1. 0:00Introduction to file-based routing
  2. 1:23Why file-based routing exists
  3. 3:07Problems with file-based routing
  4. 6:33File names as an API
  5. 8:57Introducing config-based routing
  6. 11:22Composing file-based routes
  7. 13:48Conditional route inclusion
  8. 15:35Internationalization example
  9. 17:22CRUD route generation
  10. 19:05Why you should use config routing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.