Live data from Hacker News

Next.js 10

nextjs.org

41–50 of 206 posts

Re: Next.js 10

#41
post #35

I tried nextjs because I thought it would be a good way to learn React but I found it really confusing. Is it really better to master React first then try nextjs?

A solid understanding of React is helpful. Mastery of React completely unnecessary.

Re: Next.js 10

#42
post #36
post #24

Does Next.js do pre-rendering, i.e. if I have a store with 500 products, will it pre-render the HTML (photos, etc.) for all 500 products and serve it as a static request? Or will it assemble the template on the server, send it down to the client and then do some amount of interactivity hydration later on during the page load? What if my store has multicurrency / multilingual versions of all these 500 pages - will it…

It _can_ prerender all of those combinations. Here is a directory I made with 1000+ pages, prerendered and hosted for free on netlify: https://www.givepuppylove.com/organizations/ . I've found that single digit thousands is about the maximum you can currently have and keep build times reasonable. If you want to recognize the user's location and display the appropriate currency or language, you would probably want to…

As far as count of pages Vercel has a limit of 16000 and Netlify technically has no limit (AFAIK), although the build times will cost you eventually. You can work around this limit in a lot of cases while keeping things prerendered by putting dynamic information in querystrings.

Re: Next.js 10

#43

I’m not a fan of these frameworks. They add another giant layer of stuff to learn and understand. I’d rather just program react and the browser instead of hoping some framework will do it all for me.

Have you tried writing a sample project? It took me a few tries to really understand the problem that these framework solve.

Re: Next.js 10

#44
post #40

> Nowadays users browse the web using their phones, tablets, and laptops, yet images are still as a one size fits all. For example: sites load a 2000 by 2000 pixel image, but phones are only displaying it as 100 by 100 pixels. That's what srcset & were invented for. > Furthermore, 30% of images on web pages are outside of the initial viewport, meaning the browser loads images that a user does not see until they scrol…

Is srcset commonly used? I am not familiar with it but I'm more full stack than frontend and often feel like front end moves faster than I can keep up with.

Re: Next.js 10

#45
I have mixed emotions on this framework. If you're doing a simple project, Next is the best around. Also great for marketing pages, etc. But if you have a more sophisticated app, with an API, page routes that need to toggle based on cookies, etc, then you have to integrate something like Express. I've done this several times with Next, and it just doesn't pay off. I've also tried to use it at work, but it changes rapidly, and it'd be too much to expect engineers who aren't keeping up with everything on the clientside to know what to do.

I feel like there's a need for something between roll-your-own and what vercel is offering.

Re: Next.js 10

#46

As someone who only really built websites using jQuery / custom vanilla js and good ole CSS2, this stuff feels completely alien to me

Try starting with VueJS... it can be added to a page just like jquery and you get the same reactivity/template/etc support on the page without having to setup a compiler/etc.

Then after you learn that if you want to create a full app, vue (in vue-cli) has config templates that will help you set everything up so you can just start adding the pages to the app. A full app is nice because the compiler and linting will catch a lot of js errors making your app more reliable, allowing you to write larger apps (this is the biggest reason people use these frameworks).

The concepts in Vue are similar enough to React, Nuxt, Next, etc that it's pretty easy to learn the others after you have the basics down.

Re: Next.js 10

#47
post #40

> Nowadays users browse the web using their phones, tablets, and laptops, yet images are still as a one size fits all. For example: sites load a 2000 by 2000 pixel image, but phones are only displaying it as 100 by 100 pixels. That's what srcset & were invented for. > Furthermore, 30% of images on web pages are outside of the initial viewport, meaning the browser loads images that a user does not see until they scrol…

Good points, you know what's even more fun?

Saying you have the only and first solution to a problem and having no comment section and never acknowledging people on twitter, hackernews and reddit.

Re: Next.js 10

#48
post #18

Earlier quoted context omitted.

They don't have enough funding. Next.js and Gatsby are in an entirely different weight class compared to Sapper. https://sapper.svelte.dev/

And... Sapper is dead btw. Rich said it recently in a video. The Svelte team is working on the next big thing combining Svelte with Snowpack. The project is called SvelteKit. https://www.youtube.com/watch?v=qSfdtmcZ4d0

Maybe this can save someone some confusion: When I searched the first result for SvelteKit seems to be another project that is dead.

Re: Next.js 10

#49

I’m not a fan of these frameworks. They add another giant layer of stuff to learn and understand. I’d rather just program react and the browser instead of hoping some framework will do it all for me.

When you're working on a larger scale (be that app complexity or number of users) these things make more sense.

Re: Next.js 10

#50
post #45

I have mixed emotions on this framework. If you're doing a simple project, Next is the best around. Also great for marketing pages, etc. But if you have a more sophisticated app, with an API, page routes that need to toggle based on cookies, etc, then you have to integrate something like Express. I've done this several times with Next, and it just doesn't pay off. I've also tried to use it at work, but it changes rap…

Why do you have to integrate with Express? Genuinely asking – that wasn't my impression.
Post reply on HN