4 ms·
No they won't. Because React is a view library, not a framework. Yes, web components might outlive React. But no, they will not outlive my JavaScript framewo
by HatchedLake721 3y ago
No they won't.
Because React is a view library, not a framework.
Yes, web components might outlive React.
But no, they will not outlive my JavaScript framework, because web components don't replace routing, data layer, testing, authz, server-side rendering, rehydration and whatever else frameworks like Angular/Ember/Next.js/etc do these days.
Rendering a view is a small part of what front-end frameworks do.
- spankalee 3y agoReact is a framework because it calls into the the components to make them go, not the other way around - the Holywood Principle. This shows up with restrictions like that you can't mix and match components with different versions of React in the same tree.
- HatchedLake721 3y agoEven React homepage calls itself a library, and mentions Next.js/Remix/Gatsby/Expo as React frameworks you can use.
- edgyquant 3y agoDoesn’t change that framework has a definition that react meets. The renderer runs your code, that’s a framework
- a_wild_dandan 3y agoYour definition is very...unintuitive to me. Control inversion (the Hollywood Principle) isn't relevant -- many systems which use it aren't remotely frameworks. Most people view libraries as tools which target narrowly scoped sub-problems of a given solution/application. In React's case, it's a view library -- the V in MVC, for instance. Frameworks are generally considered holistic set of tools which tightly integrate together to form a structured & opinionated approach to the larger solution, e.g the entire MVC approach. React is widely considered a library. React doesn't tell you how to structure your project, manage its backend communication, handle application state, routing, etc. React is just...not a framework. For any standard notion of what engineers mean when using the term. If you use IoC to distinguish libs/frameworks, you're going to confuse the hell outta people. There are certainly technologies which straddle the line between these terms, but React is not one of them.
- Tade0 3y ago> React doesn't tell you how to structure your project, manage its backend communication, handle application state, routing, etc. React is just...not a framework. Technically it doesn't, but the conventions that grew around it and the availability of learning material effectively produced same default choices, making it a framework via convention. And I see it as a good thing, because having several competing router implementations is an unnecessary headache. The React crowd would do good to stop being in denial about this.
- throwaway290 3y agoReact is not a web framework... You think of things like Next or Remix, those are. There's no inversion of control, it's not a framework. Words mean things
- spankalee 3y agoReact is a framework. There is inversion of control: React calls into component to make them go, not the other way around like a normal dependency.
- throwaway290 3y agoHave you used React? It doesn't do that stuff for you. You need to call another lib (react-dom) to make it happen. If you are not aware about it perhaps you've used a framework or template not react itself :)
- iamcreasy 3y agoDistinction between library and framework has nothing to do with how much stuff they do. The difference is - as the parent comment said - inversion of control. Can you create React component and take full control of component lifecycle outside of React rendering loop? - if yes, then you can call it a library. I think React doc, by calling Next a framework, is referring to a set of practices and protocols. But different usage of same nomenclature in the same discipline is very common.