Hacker News new | ask | show | jobs
by thomascgalvin 1590 days ago
> According to that definition, React is not a framework, but Gatsby is.

I dislike articles like this. The vast majority of people would consider React a framework, and if you need to redefine such a basic word in order to make your point valid, there's probably an issue with your argument, not the definition.

6 comments

I think it's reasonable to say that React is a UI framework because you have to build your UI within it if you choose it. The author's argument that because it doesn't provide the kitchen sink it isn't a framework, misses the issue that you can have frameworks for subsets of a project. You get UI frameworks (React, Angular), CSS frameworks (Tailwind), backend/API frameworks (GraphQL), etc that only lock in one area.
It’s a bad argument. React is still a framework and not a “library”.
I get the argument the author is making. React is a Javascript framework, but Gatsby is a React framework. So you have a situation where you have a framework for a framework.

Having worked with both, React isn't just an "opinionated way of writing JS", it uses Javascript under the hood but there's a ton it does uniquely, that is there is no JS equivalent, this is a thing that only React has (hooks, context, etc).

According to https://www.reactjs.org react is "A JavaScript library for building user interfaces"
As someone wrote further down the thread, the official position of React is that it's not a framework, so it's not just this article making this point.

I agree with you that there's something slightly wrong about that framing on the part of the devs.

But this is just the old descriptivism/prescriptivism divide again.

React is a framework if you let it be a framework.
React marketing insisted on being a library for too long and Vue is distinguishing itself by saying they aren't a library, they're a framework.

https://www.youtube.com/watch?v=2KBHvaAWJOA

I like calling React a component framework and Gatsby/Next an application framework.