Next.js 9.2
nextjs.org
nextjs.org
The only thing that's (slightly) concerning to me is the rate of change. It's a double-edged sword. There are features/patterns in Next.js that made sense 6 months / a year ago but are now not preferred. An example would be API routes and dynamic routing improvements.
These are definitely welcome (and good!) changes, but it makes a lot of old examples become out of date fast and it feel like "churn" - even when the features are helpful.
Maybe that's just the cost of doing JavaScript in 2020.
That is the cost of doing JavaScript any year.
You can find the same statement you wrote pretty much for every year since JavaScript frameworks became popular.
Do you have an example of what changed? We haven't really made any breaking changes for quite some time and have been improving on the existing feature set. Smaller bundle sizes with no code changes etc are part of this.
If you take the getting started readme of Next.js 3 years ago it still works today.
When new features and changes roll out (like CSS support in 9.2), they are _good_ improvements. I'm simply stating the rate of change is drastic. Which, as mentioned, is both good and bad.
Here's a solid example. If I were trying to integrate a Firebase API to my Next.js app before API routes, the recommendation might have been to run a monorepo where one app is Next.js + custom server and the other is a Node.js API (deployed with now).
Next 9 and API routes made that unnecessary. Now you can just embed an API route under /pages to talk to Firebase.
Now, if you search for "nextjs firebase example" you might find three or four different ways of doing it on Google. As you said, they all still _work_, but they're not idiomatic Next. It can be hard to dumpster dive through Spectrum chats and GitHub issues to find the new "recommended way" of doing things.
This is a very minor gripe. You're doing amazing work, Tim!
This is a really basic issue that negates all the good they've got and it's frustrating.
Not sure if it exactly allievates the problem you face, but that's where I ended up when trying to share layouts in a sensible fashion.
...essentially we listen for route changes in our top level layouts using that hook to coordinate which parts of the page to keep active and which to show spinners on.
I’d imagine there are more robust ways to do this too: I think I saw a plug-in that uses element ids to figure out how to morph the page.
Next.js examples use npm, but I have seen a lot of new projects to go with Yarn. Is this battle yet decided?