News for hackers. Stuff that matters.
Re:Ask HN: Which React framework for a new project? by jstx1 on Monday April 10, 2023 @02:39PM (#35515744)
(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???

Re:Ask HN: Which React framework for a new project? by calculated on Monday April 10, 2023 @04:09PM (#35516827)
So generally no, React is a JavaScript library not a framework. And in the JS world frameworks on top of frameworks is common.
Re:Ask HN: Which React framework for a new project? by jytechdevops on Monday April 10, 2023 @06:54PM (#35518376)
thanks for asking this, I'm too embarrassed to ask it myself but had the same thoughts.
Re:Ask HN: Which React framework for a new project? by hoofhearted on Monday April 10, 2023 @07:53PM (#35518888)
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.

Re:Ask HN: Which React framework for a new project? by ilt on Tuesday April 11, 2023 @01:12AM (#35521111)
So, multiple component libraries can be used inside one framework like Next.js?
Re:Ask HN: Which React framework for a new project? by hoofhearted on Tuesday April 11, 2023 @06:13AM (#35523027)
Yes, if you wanted.
Re:Ask HN: Which React framework for a new project? by austin-cheney on Tuesday April 11, 2023 @01:38PM (#35528428)
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.

Re:Ask HN: Which React framework for a new project? by pelagicAustral on Monday April 10, 2023 @02:44PM (#35515824)
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...

Re:Ask HN: Which React framework for a new project? by bnchrch on Monday April 10, 2023 @03:18PM (#35516214)
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.

Re:Ask HN: Which React framework for a new project? by logicalmonster on Monday April 10, 2023 @03:47PM (#35516560)
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.

Re:Ask HN: Which React framework for a new project? by schwartzworld on Monday April 10, 2023 @04:06PM (#35516793)
> 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.

Re:Ask HN: Which React framework for a new project? by logicalmonster on Monday April 10, 2023 @04:15PM (#35516871)
> 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.

Re:Ask HN: Which React framework for a new project? by terandle on Monday April 10, 2023 @04:30PM (#35517028)
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

Re:Ask HN: Which React framework for a new project? by denysonique on Monday April 10, 2023 @04:34PM (#35517069)
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."
Re:Ask HN: Which React framework for a new project? by motogpjimbo on Monday April 10, 2023 @06:43PM (#35518289)
A framework built on top of a framework built on top of a framework?
Re:Ask HN: Which React framework for a new project? by wadayano on Monday April 10, 2023 @05:13PM (#35517471)
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

Re:Ask HN: Which React framework for a new project? by nathants on Monday April 10, 2023 @05:32PM (#35517656)
reagent.
Re:Ask HN: Which React framework for a new project? by ostenning on Monday April 10, 2023 @07:05PM (#35518486)
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.
Re:Ask HN: Which React framework for a new project? by hoofhearted on Monday April 10, 2023 @07:38PM (#35518775)
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 code base.

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.

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...

Re:Ask HN: Which React framework for a new project? by gardenhedge on Monday April 10, 2023 @07:53PM (#35518896)
I always answer these questions the same way: Remix Run
Re:Ask HN: Which React framework for a new project? by nicognaw on Monday April 10, 2023 @10:40PM (#35520092)
Maybe a bit extreme, but I am going to use Remix and only Remix for my new side projects.
Re:Ask HN: Which React framework for a new project? by srcreigh on Monday April 10, 2023 @10:58PM (#35520208)
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

Re:Ask HN: Which React framework for a new project? by kebsup on Tuesday April 11, 2023 @07:44AM (#35523716)
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.
Re:Ask HN: Which React framework for a new project? by hotshoe on Saturday April 15, 2023 @02:44PM (#35583380)
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.