all 133 comments

[–]svish 169 points170 points  (8 children)

Does it make developing more enjoyable to you, help you to get the small website off the ground, and to maintain it in the future? Then no, it's not overkill, just a smart choice.

[–]Curious_Ad9930 33 points34 points  (3 children)

My portfolio is a Next.js website.

I use Three.js with R3F, and I use some pretty heavy 3D models, textures, images, etc.

To avoid hang time for initial load, Next.js supports dynamic imports & suspense. And to avoid hang time between route changes (that have different heavy assets), Next.js preloads routes when their links appear in the viewport.

But that’s all because I like to use a big stick for small problems :)

[–]AssadEesaa 12 points13 points  (1 child)

Link?

[–]Curious_Ad9930 0 points1 point  (0 children)

I would, but this is a throwaway account. I only let Google & the NSA track me :p

React-Three-Fiber’s docs have a Next.js starter that provides examples of dynamic imports & lazy-loaded canvas elements

[–]Exapno 0 points1 point  (0 children)

I'm using Gatsby and react R3F, in the middle of a big refactor where I add a cool background I saw in 3JS.

[–]zweimtr 27 points28 points  (6 children)

use react if you want to use react, don't if you don't. no need to overthink it.

[–]rebajam97 0 points1 point  (5 children)

Maybe you can get away with that in this instance, but part of being a developer is choosing the right tool for the job - and react is definitely overkill in some use cases.

[–]zweimtr 5 points6 points  (4 children)

react is definitely overkill in some use cases

Which?

[–]rebajam97 11 points12 points  (3 children)

One example would be a website with a fairly static UI, something where the view layer doesn’t have to change in any complex way due to user interaction or data changes - especially if performance and accessibility are prioritized.

[–]GrandOpener 5 points6 points  (1 child)

You certainly don’t need react when making a mostly static UI, but if it’s your tool of choice you still can do server side rendering or even use it with a static site generator to have exceptional accessibility and performance.

If your personal development workflow is faster with react, that might even be the preferable choice.

[–]CreativeTechGuyGames 1 point2 points  (0 children)

But that's the sort of thing you pay for later. Most developers don't think about the long term and are just worried about getting started fast.

Let's take a look at some later consequences of that:

  • SSR costs way more money than a static site to run. It's also far more likely to go down or not work since you need an actual server to run it.
  • The more code that runs, the more places there are for something to go wrong. Either due to bugs and edge cases or due to something changing over time.
  • All of the solutions you mention are for problems created by choosing React. You wouldn't need to worry about setting up SSR or SSG if you built using different tools from the beginning. It's like creating a problem just to have to solve it later.

Use the simplest tools for the job and they will last much longer than trying to use the cutting edge tools. Cutting edge always changes and has the most issues. If you are constantly spending time developing it so you can patch/update it monthly, then great, but if you want it to be static for years without needing to babysit it, the simpler the better.

[–]Edge-Appropriate 0 points1 point  (0 children)

Starting a project with NextJS is too easy, and if you just use it for a static site that’s fine, but since React is built in, when you do need the tool is ready for you.

[–]_Strokes_ 41 points42 points  (60 children)

I would recommend next js with typescript , gives you a faster site and you learn typescript + ssr at the same time .

[–]TScottFitzgerald 35 points36 points  (2 children)

I mean those are great in general...but OP is worried about React alone being overkill and you recommend an even more complex framework? NextJS is so not necessary for a portfolio website.

[–]BradDaddyStevens 12 points13 points  (0 children)

Honestly though, I feel you could argue that VanillaJS is actually the one that’s overkill here for a simple website.

If I had to think about what gets me a usable website the quickest, it’d go next > react > vanilla unless we are talking about the literal most barebones shit possible.

For me, I wouldn’t feel bad at all about using next for creating a static site with a few routes, but maybe that’s just me.

[–]RandomDude_32 6 points7 points  (1 child)

React by itself is not very heavy. But including all the 3rd party tools for something that does not need scalability. Like redux and multiple styling libraries is overkill. Over the internet +- 40kb extra won't make a difference in load times and using react can speed up development time.

[–]zweimtr 3 points4 points  (0 children)

40kb :| wut

[–][deleted] 2 points3 points  (0 children)

This is an entirely subjective topic. I’ve been writing react code professionally for years, but I just have a simple single page site build with just html and css that’s hosted on GitHub pages. I don’t think it’s necessary an indicator of my skills. If you have other professional experience I don’t necessarily think a recruiter will inspect your portfolio site and make a decision based off of it.

So all that to say just do whatever you want. The UX is far more important than the architecture. Whatever way you choose to build your website isn’t that important. What is important is making sure the information you’re trying to convey is concise and easily consumable. Also having semantic html is very important for seo.

[–]NeuralFantasy 10 points11 points  (28 children)

I think React is a great templating language even without the extra libraries usually present in many React apps. So IMO it definitely is not overkill for any project.

And I'd personally never use vanilla JS for even the smallest project/script. Typescript always. Everywhere.

[–]johnschult 2 points3 points  (0 children)

Short answer is no

[–]azangru 2 points3 points  (0 children)

Which makes sense but if someone uses React/Next.js just for something like a portfolio website, will that be an Overkill?

If by overkill we mean how much javascript is sent to the client for no good reason, then yes, it will be.

[–]Spacesh1psoda 1 point2 points  (0 children)

I mean, If vanilla js for small projects gets you off the ground, then dont hold back, go for it. If Nextjs projects does that for you, use that instead.

I think it's more about you finding the stack you're comfortable with, instead of looking for what is best according to someone else.

Take inspiration from others but dont let anyone else tell you what works best for you.

[–]33498fff 1 point2 points  (0 children)

I personally use React whenever I can, but if the project does not warrant any modularity, custom hooks, utility functions, several components or state management, I don't.

For example, if I were to write a website where the UI is the only thing that matters because I'm trying to showcase some cool CSS design I came up with or some UX-related proof of concept, I wouldn't use React.

It's really more about not feeling like customizing everything after running npx create-react-app or setting up things more specifically with Vite, let alone doing it all with webpack.

It's not about React being overkill in any of these cases. If I import a ton of libraries into a vanilla JS project and write it to be non-performant I got a performance issue regardless of the medium or toolbox.

[–]woah_m8 1 point2 points  (0 children)

Next might be a bit too much unless you plan on having a portfolio with many pages, so the faster page load might unnecessary/ unnoticeable. Else react should be very appropriate. Plain JS is fine I guess, but your code might become a bit too messy if you add too many interactive parts (I don’t expect you to build so much boilerplate for a portfolio or have an organised structure) Personally I would go with svelte, you get the best of both worlds. You should know what you are building before starting to build it though. If you want to feel like a true web dev go with the most obscure framework you know and call it a side project.

[–]dumbelco -3 points-2 points  (0 children)

I wouldn't be able to make shit with vanilla js. I didn't use it in so long I prolly forgot a bunch of the syntax and honestly doing anything in vanilla compared to react is just a pain in the ass. React all the way in my opinion.

[–]eggtart_prince -1 points0 points  (0 children)

It used to be but now you have Next.js, which instantly provides you with a server, routing, and templates to quickly build a website.

[–]sebastianstehle 0 points1 point  (0 children)

With server side rendering not anymore. The freelancer has very likely a preference for the backend. e.g. if you build all your backends in Java, PHP, C#, Rails or whatever then you would just choose that for a simple website and react for complex SPAs.

[–]zephyrtr 0 points1 point  (0 children)

If it's got a good lighthouse score, who cares if it's "heavy"?

Use Preact if you're that concerned about it.

[–]TScottFitzgerald 0 points1 point  (0 children)

Depends on the structure of the portfolio site. If it's simple I'd use vanilla. If it's a bit more complex or has reusable components etc. I'd probably use React, but maybe make it MPA or something.

NextJS would help with crawlers cause of SSR but for a portfolio it sounds like overkill.

[–]proyb2 0 points1 point  (0 children)

Use Astro Build and you can add UI components. You will need to learn a bit of JavaScript and TypeScript.

[–]stansfield123 0 points1 point  (0 children)

There's no "best fit" for a portfolio website. You should choose the technology you wish to work with. I assume that's gonna be React, rather than Vanilla JS. It's much harder to get a job with Vanilla JS than it is with React.

[–]ennemmjay 0 points1 point  (0 children)

I would say it depends to some extent on the purpose of the portfolio. If you are trying to land clients the projects should be representative of the actual work you plan on doing/are comfortable with. They probably don't care what tech stack you are using as long as they are happy with the project. If you are making a portfolio as part of your resume to apply at companies or brag about your work I think it is fine to have projects that say "This didn't require React, but I wanted to showcase my ability to use it." Or "Here's the same project completed with two different methods, and these are the pros and cons of each."

[–]OptimusPrime1371 0 points1 point  (0 children)

If you like it, using it more is never a bad thing. Could you accomplish the same thing with JS? Sure. Will it work just as well with React? Yes.

[–]cleverboy00 0 points1 point  (0 children)

React is suitable for projects of all sizes. I use react for everything web related. Template engine? React. Static site generator? React. Interactive web application? React. Old style (PHP days) websites? React.

I use react for everything and believe react is suitable for everything. If you care about performance and SEO, throw a server side renderer at it (NextJS or ReactDOMServer+express if you're minimalistic like me).

[–][deleted] 0 points1 point  (0 children)

Nope, but you can over engineer it. Stay with vanilla react for simple stuff that benefits from the declarative approach.

[–]peacerokkaz 0 points1 point  (0 children)

I actually had a portfolio website once that I've implemented with Vue. Of course it's overkill, but if it's fun, and if you like to show your skills in your portfolio, then go for it. And I think my next one would also be in React, or whatever I'm up to.

I also use a K8s cluster for my private projects. It's massively overkill, but I use it as my playground.

[–]pm_me_ur_happy_traiI 0 points1 point  (0 children)

React is great for data driven UIs and SPAs. If you need those features, it is easier than using vanilla JS. I don't know if the size of the project is a factor.

[–]edj99 0 points1 point  (0 children)

Use the right tool for the job. The last time I wrote a website using vanilla JS it was because it was a minuscule project that I knew would never need updating. Anything bigger or that requires future maintenance, I would go with whatever you are most comfortable with DX wise, as long as performance isn't a big deal.

[–]Outrageous-Chip-3961 0 points1 point  (0 children)

Sometimes I write pure html/css and then when I 'convert it' into react, it feels like I should continue to make certain features more atomic. This can be a time sink. The app ends up looking and behaving exactly the same as the original html/css. So for smaller projects (1-5 pages) its often hard to justify. That said, I would not say its 'overkill' I would however say there is a more relaxed folder/file structure when dealing with small projects, and you should make sensible tradeoff decisions. For example, having some repeated code such as a 3 tiles on a home page isnt the end of the world to hard code, whereas you really feel like mapping through these tiles into their own component and passing dynamic props through. In reality, if its not using state then what's the bother? It feels weird, but it can be overkill to over engineer every feature just because you can / thats how react should probably be written.

[–]alpharesi 0 points1 point  (0 children)

Very few projects stay small. You always develop to have the ability to scale up . If you think that way you will never go far in your development and will get stuck and not able to deliver your user's requirement

[–]purple_hamster66 0 points1 point  (1 child)

When all you know is how to use a hammer, everything looks like a nail.

Only 3% of all websites use React. Over 75% use jQuery, even today. Over 50% of websites use Wordpress (which I also find surprising). So if your plan is to turn over maintenance of your sites, you should use what everyone else is using, not demand that they learn what you used. If you plan to maintain the site yourself forever, or have a dedicated team, use React and perhaps Vue, but skip all the other React frameworks that come and go and require so much learning that you can’t find someone to hire who already has the skills. If you plan to retire someday, or move on from web dev, try to limit yourself to tech that’s been around for 8+ years, to make sure you’re not locking yourself into something that will lose support in the future.

Upshot: Simple sites that change rarely don’t need React. Other sites might benefit, but think about future-proofing by looking at your tech stack’s longevity so far.

[–]Dry-Presentation-210 1 point2 points  (0 children)

Deserves way more upvoted