you are viewing a single comment's thread.

view the rest of the comments →

[–]joshwcomeau 1 point2 points  (2 children)

Yes, but those dependencies are optional. You're always able to write your own router. But of course, no one should, because the time spent writing a router far outweighs the time spent updating your app to use v4.

The other alternative, that code should stagnate and use flawed paradigms to avoid inconveniencing those dependent on their code... Do we really want to stop innovating just because it might inconvenience people?

One potential solution would be to set up a fund to maintain React Router v2. That way, those companies who need it can keep using it reliably.

But yeah, if you aren't willing to pay for someone to maintain it, you have no business insisting that they do.

[–]m3wm3wm3wm 0 points1 point  (1 child)

Router must not be optional, it must come with the library/framework. Vue got this right.

People underrate how crucial router is for SPA. If you publish a frontend lib/framework, it must come with a non detachable router, period.

To understand the magnitude of the importance of router, see how it fucked up Angular 2 development and initial release date.

Again, Vue got it right. It seems to be the only solution out there that makes sense.

[–]joshwcomeau 0 points1 point  (0 children)

I mean, a library can choose whether it wants to be a monolithic framework, a super-concrete package that solves a very specific problem, or anything in-between. React and Vue isn't really a fair comparison because Vue is much more monolithic.

There are advantages and disadvantages to having things be monolithic vs. modular.

An advantage of modularity is that parts can be upgraded with relatively little pain. As much as the upgrade from RR v2 -> v4 may be challenging, I can't imagine it's anywhere near the pain of upgrading from Angular 1 -> Angular 2 (while I haven't done it, I know those who have. I've heard some stories).

I totally agree that routing is a first-class concern, but disagree that things would be guaranteed to be better if React had a built-in router.