Live data from Hacker News

Next.js 10

nextjs.org

141–150 of 206 posts

Re: Next.js 10

#141
post #92

In Vercel page they tout: "Developers love Next.js, the open source React framework Vercel built together with Google and Facebook". Did Google quit Angular and is using React now?

Google does a lot of different things. In this case, it’s part of the Chrome team that has been focusing on this and how to help the web dev ecosystem more broadly.

Re: Next.js 10

#142
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…

> That's what srcset & were invented for. Next.js is going to be using srcset under the hood, I'm sure. The whole point of Next.js is to make best practices like this defaults, not to do anything groundbreaking and new.

Correct, it uses srcset.

Re: Next.js 10

#143

Why are all these frameworks so big. Compiling, boiler plating, templating, huge API's etc. I just want a real component framework where i can have something like: include "MyComponentFramework.js" page = new Page(); panel = new Panel(); button = new Button().addCssClass("buttonclass"); Page.addComponent(panel) panel.addComponent(button) button.bind('click',function(){ panel.addComponent(someComponent); panel.rerende…

The main thing this is missing is HTML. Sure, you can use bootstrap across the project, but components need to have their custom CSS too.

If you added HTML (or really JSX, but same thing more or less), it might look like:

   
   include "MyComponentFramework.js"

   page = new Page();
   function handleClick() {
     panel.addComponent(someComponent);
     panel.rerender();
    }
    

    return 
        
            
        

   


At this point, honestly you're not far off from Nextjs. Instead of callinig `new Page()` you'd create a file in `pages/my-page-name.js`.

Re: Next.js 10

#144
post #87

I understand this is a Vercel framework and probably a great distribution channel for new business and increasing overall revenue. But, I'm a bit disappointed the "next" version is more about Vercel's own internal business agenda. Promoted as amazing "DX" is not really true. It had a better DX compared to the other tools, that's why it grew so popular, but not seeing anything real DX related in version "10". Other to…

I feel the same way. We've switched from React to Svelte at work. Going back to React would be a step backwards for us, so much feels needlessly overengineered with awkward APIs. React was a great improvement on Angular, but luckily things are still moving forward.

Well, this sounds a bit typical JS dev talk. React isn't all that terrible, it's actually quite good and battle-proven. It has great libraries, many devs are familiar with it and if you know it well you can be pretty damn productive with it.

Not to say Svelte doesn't have great innovative features, but I myself don't still feel that tempted to jump into Svelte. What some of us don't like, is the infamous JS churn where libraries are changed every year because "this new one is better".

Re: Next.js 10

#145

I understand this is a Vercel framework and probably a great distribution channel for new business and increasing overall revenue. But, I'm a bit disappointed the "next" version is more about Vercel's own internal business agenda. Promoted as amazing "DX" is not really true. It had a better DX compared to the other tools, that's why it grew so popular, but not seeing anything real DX related in version "10". Other to…

You are looking at it from the point of view of an app developer, not that nextjs can't do app but a lot of its users are e-commerce businesses

Re: Next.js 10

#146
post #144
post #87

Earlier quoted context omitted.

I feel the same way. We've switched from React to Svelte at work. Going back to React would be a step backwards for us, so much feels needlessly overengineered with awkward APIs. React was a great improvement on Angular, but luckily things are still moving forward.

Well, this sounds a bit typical JS dev talk. React isn't all that terrible, it's actually quite good and battle-proven. It has great libraries, many devs are familiar with it and if you know it well you can be pretty damn productive with it. Not to say Svelte doesn't have great innovative features, but I myself don't still feel that tempted to jump into Svelte. What some of us don't like, is the infamous JS churn whe…

Some of us are attracted to JS dev because of the rapid evolution and change. React is well-tested and mature, I'm simply stating that for me personally going back to it would be frustrating after developing in Svelte.

Re: Next.js 10

#147
post #119

Earlier quoted context omitted.

UI component libraries for Svelte are a little lacking in maturity in my experience. I would recommend including a CSS library such as Bootstrap or Materialize. Tailwind is also popular, but not my cup of tea.

So, React is backwards, but you are using Bootstrap instead? Lol. Webdevs at their best.

There are good alternatives to React that are as actively developed. There don't seem to be good alternatives to Bootstrap that are nearly as actively developed (excluding CSS utility class libraries like Tailwind).

My team recently evaluated 30-40 CSS frameworks to use with a custom component library, and we were surprised when Bootstrap was the clear winner. Other CSS frameworks have gotten buzz over the years, and we assumed something new and shiny would come out on top, but when we evaluated all of them, we saw sporadic commits, many unresolved issues (e.g., see Bulma issue 3074), small bus factors, inadequate support for keyboard navigation, and other issues.

So using Bootstrap with a newer alternative to React is valid. (Though, we're using Bootstrap with Next.js.)

Re: Next.js 10

#148
post #119

Earlier quoted context omitted.

UI component libraries for Svelte are a little lacking in maturity in my experience. I would recommend including a CSS library such as Bootstrap or Materialize. Tailwind is also popular, but not my cup of tea.

So, React is backwards, but you are using Bootstrap instead? Lol. Webdevs at their best.

By all means, stick to your React or Java backend or whatever it is you do if that's where you feel most comfortable. No need to feel so threatened by new alternatives.

Re: Next.js 10

#149
post #21

Earlier quoted context omitted.

They've been talking about it for years alongside with SSR streaming. Nothing concrete so far.

Is this not SSR streaming? https://reactjs.org/docs/react-dom-server.html#rendertonodes...

I could be wrong, but I don't think so, no.

> The HTML output by this stream is exactly equal to what ReactDOMServer.renderToString would return.

I imagine this returns a stream as a convenience for Node servers that are streaming chunks of HTML. I don't think it means that React's SSR is rendering chunks of HTML in an async fashion and returning each chunk to the stream as soon as it's ready.

Also look at the last task of suspense:

> Implement a streaming server renderer

https://github.com/facebook/react/issues/13206

Re: Next.js 10

#150
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…

I recently played around with Next 9.5 prerendering. It had about 400 simple pages with artificially slow API responses to get an idea.

- you can prerender a decent amount of pages no probs

- you can prerender only a subset and then have Next render the necessary pages on the server upon request

- as the page is being prerendered, you can send placeholder content, so ttfb is low

- linking to a non-prerendered page within Next will prefetch (and thus prerender) said page as soon as the link is in the viewport (can be disabled)

- in Vercel you can set the branch name as an env variable. I set it to prerender almost nothing during build time if the branch name contained “hotfix”

So far I think it is worth serious consideration. Will it work for you? I dunno. But it’s a breeze to set up, quick to learn, and run some experiments of your own.

Post reply on HN