A bit of hand-wringing over the release of Next.js 13: two brilliant steps forward—and maybe one step back?
This wouldn’t be a hand-wringing Internet Tech Thought-Piece without a big but, though, so: BUT:
I get that the React team (and the Next.js team, if there’s still a meaningful difference) are architecting a Pit of Success—but there’s a fine line between making the right thing easy and making the wrong thing feel right. Speaking from experience, writing crummy application code and relying on Next.js to optimise my mistakes away was the simplest approach to building my old website. Next.js makes it so easy!
Like here’s an example: React now overwrites the global fetch() browser API. Here’s the code that does it. They do this so that Next.js can do a bunch of caching magic behind the scenes—magic like automatically deduplicating requests for the same data. Setting aside for a moment the ickiness of overwriting global objects, this encourages developers to ignore the obvious code smell of multiple identical requests being triggered from different components. Deduplicating requests should be the responsibility of the application design, not a black box feature of the framework.
CSS nesting has been a long time coming, but when it finally arrives, we're not actually going to need it anymore.
Saw Bon Iver at the First Direct Arena in Leeds on 19 October, 2022.
Posts Stream Books Walks • Clear filters