logoalt Hacker News

roblhtoday at 1:58 AM4 repliesview on HN

The router is really baffling, agreed. Magic file names make me so frustrated, and even more so when they all start with the same prefix so all my editor tabs look the same. I wish they’d just make a simple single file router that works the same as every other one. There are a lot of things that aren’t perfect in Vue, which I primarily work on, but the router isn’t one of the things that bothers me. It mostly just works.


Replies

sensanatytoday at 7:47 AM

Magic files are one thing (and just personally having a filenane beginning with + is just damned ugly). You also even have magic folders, which for me was a first.

Even if I could ignore that, for my super tiny hobby project that I tried Kit with, the routing ended up being strewn across a million folders and files that are called +page nested in (page) folders, and a super tiny app turned into a nightmare to navigate and find things in. I didn't even use any of the stupid SSR stuff, just SPA mode, I can't even imagine what it ends up looking like with +layout and all the server-side files

hu3today at 7:56 AM

> they all start with the same prefix so all my editor tabs look the same

You see, this is something I think deeply about when creating a web framework.

I'm just glad there's another person on this plannet who thinks about file names and how they appear in code editors.

digianarchisttoday at 4:51 AM

I don't understand why frameworks that offer file based routing don't provide a way to define routes using either a configuration file or some library calls.

Danjoe4today at 7:12 AM

Just drink the Koolaid. I hated the magic files but now I love them