| > what do I do with my other, already well-developed side project that uses Mantine and Next pages router? I can continue to use the pages router, but for how long? I honestly think css-in-js solutions that inject styles into the document head at runtime like Styled Components and Emotion were never really sustainable or performant, and server components just revealed the inadequacy of these techniques. Generating actual stylesheets at build time is obviously more performant (using Linaria, PandaCSS, Tailwind, CSS Modules, etc). Even one of Emotion's maintainers proclaimed he was "breaking up with css-in-js" over a year ago [1]. He had this to say (before the app router was even announced): "With CSS-in-JS, there's a lot more that can go wrong, especially when using SSR and/or component libraries. In the Emotion GitHub repository, we receive tons of issues that go like this: I'm using Emotion with server-side rendering and MUI/Mantine/(another Emotion-powered component library) and it's not working because...". Granted, even if css-in-js solutions are less than ideal, I still think Next should continue to support them for compatibility reasons. Neither of us can predict the future, but I would bet that Vercel will continue to support the pages router given that they have customers to answer to. Money is a powerful motivator. > At the end of the day, IMO the main difference is attitude. > I realize its hard to make a convincing statement about frequency/magnitude/probability/attitude though. Like you said the problem is that it's hard to make a convincing statement about community attitude. All we can do is go back and forth with anecdotal evidence. You'll speculate about whether or not Vercel will continue to support its pages router, and I'll provide my own anecdotes like the example I gave of InfluxDB (a Go time series database) deprecating its entire database query language on two different occasions, which fundamentally broke the entire product. > What kind of data would convince you that the situation in the JS ecosystem is bad enough that it warrants a priority shift in the community? The only data either of us have is anecdata, which is why we're kind of at a standstill here. [1] https://dev.to/srmagura/why-were-breaking-up-wiht-css-in-js-... |
Sure. But here we have one that happens to be used by most popular UI toolkits. Forget about Mantine, it feels like MUI is in every other project.
Now again anecdotally, outside of the JS community, the approach and attitude of maintaners would typically be:
- how do I make this extremely widely used package have less issues with minimal backward compatibility breakage
- can I additively introduce features that are not prone to the issues
not "I'm starting over"
Just in the article comments there are 5 other people pointing out a variety of issues with the author's new favorite choice. And they're all kinda right - all choices have tradeoffs. That's precisely why only dedication to compatibility and continuity can grow any one of them into something that is still sensible to use while acknowledging its limitations.
This is IMO a more sensible approach to software engineering
- Start with an approach that is significantly stronger in a certain aspect
- Acknowledge its limitations
- Work to ameliorate those as much as possible
P.S. the article about Emotion is also an example of how React's "no wait, this was always a bad idea because <X>" (where X in this case was concurrent mode) is causing rippling breaking changes. Again, this is their prerogative and at the end of the day, they have their own priorities internally at Facebook. But that's not necessarily healthy for the wider community.
Also FWIW, InfluxDB's approach to breaking changes has been compared to "a random npm library" https://news.ycombinator.com/item?id=37206194
> The only data either of us have is anecdata, which is why we're kind of at a standstill here.
This discussion has been also been useful for helping me pinpoint what exactly is different about JS when I'm working with it.
I'm still hoping I was at least somewhat convincing, because I don't think this is a problem that can be tackled without wider acknowledgement from the JS community.