Next.js 10.2
nextjs.org
nextjs.org
I don't have access to the Next.js telemetry data, but I could definitely need to ask the Next.js team from time to time: "so, are your users more using Yarn workspaces? Or npm link? Or something else?", etc.
For the same reasons some people complains about Ubuntu removing some features because they say "people don't use it", while people using those features tend to disable the telemetry. Sometimes, telemetry is useful.
It is not to spy on users, it is about making the best technical choices to ensure the best Developer Experience.
_edit: typos_
Also, about removing features based on telemetry, of course people are going to disable or block data collection and you will make decisions based on incomplete data. If you must remove something, do it because it makes sense and it fits within your vision for the future of the project you maintain.
There are major OSS projects with no telemetry that are hamstrung by their lack of insight about which platforms and systems their software is running on.
Everyone should have the right to turn it off, but I think this is going to become the norm.
And this isn't just for their official hosting service? That would be much more understandable
I remember discovering this a few years ago and was so annoyed that it was on my default and had to have this in my .npmrc:
metrics-registry = null
send-metrics = false
Looks like now it's off by default and they do not gather identifying information, I'm happy for this change.> We're excited to announce Tobias Koppers, the author of webpack, has joined the Next.js team at Vercel.
Also, a global getServerSideProps ran on all pages would be great. I use getInitialProps in _app.tsx now to make a server side request to get initial user info (e.g. the current user name, access level, etc), but this method is ran on both client and server requests so it has some hacky stuff like returning early if window is undefined or if the requested url ends in .json (when next tries to load a new page on the client side)
Basically, there is no way to produce a truly static / SSR ( `next export`) build with i18n; this means one cannot host a multi-language site on a free hosting solution like GitHub pages.
One request would be an official state management extension – coming from Vue and Vuex, this is something I miss. We're currently using Redux Toolkit, but would be great to have something official for Next along the lines of Vuex, Reframe, or Elm.
* update (writing this between lots of meetings :| )
One huge value we get from Next is the opinions and conventions. Large dev teams benefit from this – which is why we've been using Ember and Ember Data for years, and Rails before that.
Having an opinionated state management that plays nicely with Next on the client AND the server is what I'd like to see. We're doing quite a few workarounds currently with Redux to support managing state from within the components and during `getServerSideProps`. If all my dreams came true, it would be nice to persist state conditionally in Redis or Mongo.
Sorry for the rambling thoughts – just loving Next, and incredibly busy building our new core IP with it.
I wrote an in-depth guide on this here: https://leerob.io/blog/react-state-management
Your state "slices" would export initial state, types (optionally), and an object containing getters, setters, and mutations (using Vuex concepts).
I like a lot of what Next brings in terms of DX polish. But I ultimately decided not to use it for recent projects, where the majority of the content is truly static. Next sends this content in HTML, then sends it again in JS. This not only adds unnecessary page weight, it also increases the uncanny valley before TTI.
The current solution to this in Next is to mark an entire page as non-interactive. This means a page will send either no JS at all, or all of it. This isn’t ideal.
There are several experimental projects exploring partial hydration with Next, but without official support they’re risky. There are also emerging projects like Astro providing similar functionality to Next with partial hydration as a core feature.
I’d imagine the most obvious way to achieve something similar in Next will be SSG with React Server Components, but who knows when that will be stable.
Anyway, curious if Vercel has anything to share on the topic.
Sooner than you might think!
1: astro.build
Could you please add your vote for "getStaticProps" for individual components also. That way I can use this component in multiple pages for example to statically rendering a tweet etc. (maybe useful for your blog too :) )
I think equivalent of this feature in gatsby is staticQuery https://www.gatsbyjs.com/docs/how-to/querying-data/static-qu...
Same question I asked in r/nextjs https://www.reddit.com/r/nextjs/comments/mmqoqm/how_to_async...
related discussion https://github.com/vercel/next.js/discussions/13390
Just wanted to say that you're doing an excellent job. Thanks!
This issue is a blocker for several people, including myself, and there hasn't been any team response on GitHub yet: https://github.com/vercel/next.js/issues/23637
Specific PR improving memory usage: https://github.com/vercel/next.js/pull/23565
Let us know if you're still seeing this issue after updating to 10.2 on the issue linked. Thanks!
Static hosting is free. Servers or DB's start at $7
https://www.netlify.com/blog/2021/03/16/try-the-new-essentia...
This is the type of thing I'd never think about but should Just Work out of the box.
Has this changed, or are there any plans to change it?
There's an open issue to explore optimizing images at build time, but for now, you can use https://github.com/cyrilwanner/next-optimized-images
You can user server-rendering on a per-page basis, as you see fit. Same with removing all JavaScript if so inclined.
More info here! https://nextjs.org/learn