News for hackers. Stuff that matters.
Re:Why is routing so complex? by erikpukinskis on Wednesday December 07, 2016 @03:32PM (#13125953)
The whole notion of putting all of the routes in a single file strikes me as questionable. I think Express has it right, define the route along with the code that's going to run on it. If you want to see all of your routes together, just have some kind of dumpRoutes() call that you can make.

And I don't believe we're saving ourselves any real complexity by creating standardized API for prefixes and such. The cost of having to type /posts/new and /posts/favorite seems like a small price to pay for a dramatic improvement in clarity and decrease in router complexity.

Some programmers take DRY way too far.

Re:Why is routing so complex? by maxdeviant on Saturday December 10, 2016 @02:01PM (#13147246)
React Router v4 places a greater emphasis on splitting up your routes, as opposed to keeping them all in one spot [1].

It also allows you to do really cool stuff like in their recursive routing example [2].

[1]: https://react-router.now.sh/basic

[2]: https://react-router.now.sh/recursive-paths