DEV Community

Discussion on: How to improve performance of Next.js website?

Collapse
 
jcubic profile image
Jakub T. Jankiewicz

I have a question, are those techniques tested only on website that can be HTML+CSS? Because your website look like it doesn't have any dynamic parts, except those lazy loading, that can probably be coded with few lines of Vanilla JavaScript.

I don't want to be rude, but I'm just wondering what is the point of using NextJS for website like this, except as an exercise or to showcase your skills. Because from users perspective it don't make much sense to me.

Collapse
 
sumukhakb210 profile image
Sumukhakb • Edited

Jakub every website is build with HTML and CSS. Yes, you can certainly write this using simply HTML, CSS, and JavaScript. However, you should use any server (perhaps NodeJS or PHP) to hide secrets (on my website, I use email password like this) and to send emails and retrieve blogs from the dev.to API (which needs data to fetch from server otherwise it throws CORS error). Also, Next.js and Nuxt.js provide an excellent developer experience by allowing you to eliminate duplicating code and construct components. As far as the user is concerned, you may still use PHP if you wish; the user just cares about performance. Also, in the next days, I intend to build a blog system instead of directing users to dev.to; in that case, Next.js will undoubtedly come in handy. Also working plain JavaScript kind of pain in the a**😁😁😁😉

Collapse
 
jcubic profile image
Jakub T. Jankiewicz

You can't actually see your website so I didn't know that you have a blog section, looking at screenshots it looks like trial to do with just HTML+CSS not much JS code need to be done. That's why I though that it doesn't make sense.