Live data from Hacker News

Next.js 10.2

nextjs.org

21–30 of 61 posts

Re: Next.js 10.2

#21
post #2

Lee from Vercel here. Happy to answer any questions :) If you have any suggestions for how we can improve Next.js, let me know!

It would be great if you guys can take another look at https://github.com/vercel/next.js/issues/18318 , lots of folks seem affected by it.

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.

Re: Next.js 10.2

#22

Sort of Next related, but I was looking into these frameworks today and it seems all of the easy hosting services jump from free to $20 for what seems to be elaborate static hosting. Is there a middle ground for hobbyists that are running commercial software without spinning up your own VPS (Vercel doesn't look kindly on commercial on their free plan).

Cloudflare pages?

Re: Next.js 10.2

#23

Sort of Next related, but I was looking into these frameworks today and it seems all of the easy hosting services jump from free to $20 for what seems to be elaborate static hosting. Is there a middle ground for hobbyists that are running commercial software without spinning up your own VPS (Vercel doesn't look kindly on commercial on their free plan).

I use google cloud run to run NextJS website, I’m paying less than $2 per month for more than 1 million/mo page views.

Interesting, I'm curious, with which product? Does that also include a db cost with it? Are you getting good latency?

Re: Next.js 10.2

#24
post #10

Earlier quoted context omitted.

Hey Lee, thank you for all your work! Big company here in Portland, and we just went all in on Next.js – so far our development speed has increased, and junior devs are easily onboarded. 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, Re…

What kind of deep integration are you looking for with a preferred state framework?

If I closed my eyes and designed the API first, it would look like the `/pages` convention – just add state "slice" files in `/store` (like `src/store/user.ts`) and then use either React hooks inside the component (like `useStore` or `useMutation`) or use something (like `getServerSideState`) on the server.

Your state "slices" would export initial state, types (optionally), and an object containing getters, setters, and mutations (using Vuex concepts).

Re: Next.js 10.2

#25

Sort of Next related, but I was looking into these frameworks today and it seems all of the easy hosting services jump from free to $20 for what seems to be elaborate static hosting. Is there a middle ground for hobbyists that are running commercial software without spinning up your own VPS (Vercel doesn't look kindly on commercial on their free plan).

I use serverless-next.js [1], it's super convenient, deploys to AWS lambda@edge, cost scales with your traffic.

1: https://github.com/serverless-nextjs/serverless-next.js

Re: Next.js 10.2

#26

Sort of Next related, but I was looking into these frameworks today and it seems all of the easy hosting services jump from free to $20 for what seems to be elaborate static hosting. Is there a middle ground for hobbyists that are running commercial software without spinning up your own VPS (Vercel doesn't look kindly on commercial on their free plan).

Cloudflare pages?

Just checked this out, looks promising, unlimited bandwidth is nice too.

Re: Next.js 10.2

#28

> Improved Accessibility: Route changes are now announced by screen readers. This is the type of thing I'd never think about but should Just Work out of the box.

Out of the box, specifically at the browser level, especially since route changes affect the History API (unless I'm mistaken)

Correct. This is specifically for client-side routing. More information here.

https://github.com/vercel/next.js/pull/20428

Re: Next.js 10.2

#29

What turns me off about NextJS is its "opt-out" telemetry. You have to do a bit of magic at the system level "npx next telemetry disable" to turn it off (which you can only figure out by an internet search). This seems very disingenuous on part of Vercel. Make it an "opt-in" or don't fricking track. Conduct a yearly survey or use some other means if you are so interested in improving the framework. I am open to other…

NPM had a similar thing: https://docs.npmjs.com/cli/v6/using-npm/config#send-metrics

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.

Re: Next.js 10.2

#30
post #12
post #2

Lee from Vercel here. Happy to answer any questions :) If you have any suggestions for how we can improve Next.js, let me know!

One thing I would love to see is React router style routing. I know some people love the file based routing, but for complex web apps I just end up having to hack my own routing onto catch all routes. For example, there is no way to build sub-routers without doing it myself. (Imagine an account dashboard with a common area, but additional tabs for other sub-pages) Also, a global getServerSideProps ran on all pages wo…

Thank you for the feedback! There is a workaround to use React Router with Next.js (https://gist.github.com/tannerlinsley/65ac1f0175d79d19762cf0...) and we're working on layouts support for Next.js, which will improve the routing story. And agreed on a better solution for global data fetching. This is being investigated as well.
Post reply on HN