Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Which React framework for a new project?
12 points by dyeje on April 10, 2023 | hide | past | favorite | 24 comments
I know there are a lot of projects out there these days (Next, Remix, Redwood, Blitz, etc). I'm curious, if you were starting something new today, what would you use?


(not a front end developer, I’m just passing by and trying to understand)

What do these frameworks do? Isn’t React itself a framework? Why do your frameworks have frameworks of their own???


So generally no, React is a JavaScript library not a framework. And in the JS world frameworks on top of frameworks is common.


thanks for asking this, I'm too embarrassed to ask it myself but had the same thoughts.


React is a JavaScript component library. That means single components from a React code base can be exported and reused in other projects.

JavaScript frameworks like Create React App, Next.js, Angular.js do not work like that. They completely compile the code base and inject the said components from above into an html page.

The biggest difference between a component library and a framework is that a framework requires 100% adoption, whereas a library doesn’t.


So, multiple component libraries can be used inside one framework like Next.js?


Yes, if you wanted.


tldr; Hiring.

Going back 20-25 years ago there was web design and back end development. Web design was considered a non-programming visually creative field. That required less work experience to achieve competence and thus was an excuse to pay those people half or less than the programmers. That immediately creates a bias that those people worth less and thus are less worthy of investment. That bias persists even though it was hardly qualified at the time and certainly out-dated now, but it goes to scrutiny of candidate selection/preparation.

Also, back in the day the hot languages were Java and later C#. Both of those were at the time essentially a garbage collected C++ with less overhead. That is what employers were looking for in programming candidates, and so that is what universities delivered. Most programmers come from university CS programs. This is true even today.

None of that prepares people to write JavaScript. Trying to shoe-horn a bunch of unnecessary OOP nonsense into JavaScript is like stabbing yourself in the face, so its nice if there is some tool to fill that gap.

Furthermore, many programmers cannot architect a new original application on their own. There is greater demand for bodies to type code than there exists people of sufficient intelligence and capabilities to fill those requirements. Frameworks are boxed architectures. Its not that everybody who uses or favors a framework is negligently incompetent, but for some people this is absolutely true and then there are people who build their entire careers upon that tool.

As a comparison a carpenter is not a screwdriver user. A carpenter is expected to deliver a product. A framework is a tool, like a screwdriver, but tool users are easier to select than craftsmen.


If you already know React I would narrow the list to Nextjs or Remix.

Afterwards I would recommend Nextjs.

Remix has some great concepts, however Nextjs is more mature when it comes to documentation, tutorials and deployment. So as a general statement by choosing Nextjs you'll have an app in production quicker than if you chose Remix.


Remix for me. Tried the new shiny objects (solid, qwik, svelte) and made it pretty far, but ecosystem just isn't there yet and fond myself spending more time making up for the gaps than worth the benefits these platform offered. Nextjs appdir is half-baked right now and handling of mutations is a joke, so you're left on with stable/pages version, knowing you're incurring technical debt with every line of code written.


nextjs has the react team fully behind it, and even some of the most important core react team members are now working at vercel. Also the new server components in the /app dir are amazing[1]. Nextjs is the easy recommendation for most projects these days.

[1] https://beta.nextjs.org/docs


What's the project about? What are you trying to achieve? Do you really need a reactive web framework?

If I were starting a project today, where my main customers are Windows desktop users, I would use one of their native SDKs/Frameworks. If I was trying to target iPhone users then I would use Swift... If I was interested in building crufty, unmaintainable, 3-year-rewrite, slug-machine software then I would pick Tauri or Electron... I was into developing a quick MVP then I would use Django or Rails... If I hated myself enough then I would use any of these wheel-reinvention JS microframeworks...


Tailwind lists Vite as the first option on their deprecating CRA notice, so I just went with that. It’s been fine.

https://archive.is/jKQZD


If you're deadset on using React, this blog goes into a nice bit of detail on the tradeoffs of some of the more popular choices: https://www.fullcontextdevelopment.com/blog/remix-vs-next-fu...

That said, IMO React is so unpleasant to use (compared to alternatives) that I'd urge you to keep an open mind about your alternatives. Svelte, Mithril, Vue, Angular, and many more.


> IMO React is so unpleasant to use (compared to alternatives)

That's not a universally held opinion, and react is worth learning if you are going to try to get a frontend job as it's the dominant way of building frontends today.


> That's not a universally held opinion

Of course not. That's why I said "IMO".

> and react is worth learning if you are going to try to get a frontend job as it's the dominant way of building frontends today.

React is worth learning for employment, sure.


If I was looking to spin up a beautiful server-side rendered website quickly without worrying about all the boilerplate code, I would use the React framework that I built called Elegant.

I have been contracted to standup a new React application complete with user guides and landing pages numerous times in recent years. I found that there wasn’t a simple React framework yet that took care of all of the reusable boilerplate code, and allowed you to build an expressive and professional website.

In a more recent project, I was contracted by a startup to build out a React frontend, complete with a user guide and blog. We ended up using Next.js, Docusaurus, and Wordpress to get a quick MVP out the door. This was a pretty good distributed setup, but I knew there had to be a better way to have everything under one project.

Elegant is a fully scaffolded React frontend built with Next.js, Tailwind CSS, and MDX Loader.

Elegant allows me to prototype a quick MVP, and throw it up online super fast by only modifying the .env config file. It’s lightening fast, and already outperforms any Wordpress site. It has a near perfect SEO score, and this is just the beginning.

I’m planning a SHOW HN soon to see what everyone’s thoughts are.

Shameless plug: https://www.elegantframework.com/blog/2023-04-05-elegant-fra...


Depends on the scale and longevity of the project. If you are building a large scale platform that wont be made redundant in 24 months, stability of the framework is absolutely key. Next at one point in time was an obvious choice, but their track record for adopting the next fad rather than defining their own philosophy would create massive technical debt at every major update. This is my anecdotal experience using next for over 6 years.


Blitz.js -- "The Missing Fullstack Toolkit for Next.js Ship. Fast. Blitz picks up where Next.js leaves off, providing battle-tested libraries and conventions for shipping and scaling world wide applications."


A framework built on top of a framework built on top of a framework?


In my experience, if you are building an app which doesn't require SSR, using next will bring more harm then good due to the additional layer of complexity.


Remix has the most batteries included, and the most decent escape hatch (react-router) if you want to leave framework-land

Nextjs would be great if all I ever needed to do was fetch stuff


Maybe a bit extreme, but I am going to use Remix and only Remix for my new side projects.


I always answer these questions the same way: Remix Run


reagent.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: