3 ms·
A common misconception. React is a library. These are examples for React frameworks: https://react.dev/learn/start-a-new-react-project#production-grade-react-f
by mzronek 2y ago
A common misconception. React is a library.
These are examples for React frameworks: https://react.dev/learn/start-a-new-react-project#production-grade-react-frameworks https://react.dev/learn/start-a-new-react-project#production...
Next.js is a React framework.
If Payload is a framework or not is debatable. I think it's more like a data layer around a database for a any js app and an Admin Panel (that uses Next.js now). It might be called a framework for your own Headless CMS, because it is code first. So you basically code the panel and the data structure yourself.
- vasergen 2y ago> React is a library Can a library have compiler?)
- robertlagrant 2y agoThat's an optional step for JSX cross-compilation. It's a language plugin; nothing really to do with frameworks or libraries.
- deleted 2y ago[deleted]
- tmtwhn 2y agoThey're going further than jsx transpilation[1] [1] https://react.dev/learn/react-compiler https://react.dev/learn/react-compiler
- zdragnar 2y agoNothing in that is actually doing what a compiler does above and beyond what babel, swc and esbuild are capable of. What they've added is wrapping your code in more memoization functions, basically. All stuff that doesn't fundamentally transform the code, aside from inserting more `useMemo` and the like. The JSX macro - which is itself already optional but everyone uses it - is just that, a handy macro with implementations available in every common bundler and transpiler out there.
- gloosx 2y agoJavascript has a compiler called Babel, which plays a huge role in modern web development. It is in fact a transcompiler, meaning it doesn't turn your javascript into bytecode, it is just transpiling stuff without changing the level of abstraction. React Compiler is just a babel plugin for automatic performance improvement, memoization specifically, for never perfectly memoized React code. Can library have compiler? Well why can't it? For example stdlib has a compiler, because C does.
- flockonus 2y agoReact started as a library.. at this point it has server side components, and a world of plugins. As for anything that has patterns of building with, will argue it's a framework.
- math_dandy 2y agoReact is a FEBEFUIRT - a FrontEnd/BackEnd-Fluid UI RunTime.
- meiraleal 2y agoReact was a library before hooks. Now it is a framework and decides when your code runs, not you. And now it is a terrible framework with server components.
- sneek_ 2y agoI think server components have been very badly marketed. They're totally opt-in, so I don't see how this would make React instantly a terrible framework. I for one think they represent a lot of value. If you don't use them, then React is quite literally no different to you.
- gloosx 2y agoCan you please guide me where this heresy is being spread?
- _heimdall 2y agoReact hasn't been a library since they added hooks. Hooks themselves are just a solution to async code, but the implication was that react was no longer a state-based UI rendering library and became a full blown frontend framework.
- threetonesun 2y agoHard to call something a full blown front end framework when it doesn’t have routing.
- _heimdall 2y agoRouting is only important for a single page applications. Frontend frameworks are applicable to normal websites as well, they don't have to be SPAs with routing, caching, etc.
- gloosx 2y agoCan you please guide me where this heresy is being spread?
- _heimdall 2y agoYou heard it here first, I'm officially breaking the story wide open.
- gloosx 2y agoFrom what you posted in this thread, I can tell with confidence you don't know shit about web development Hooks solution to async code? Hooks make React full blown forntend framework? Routing only important for single page applications? Yellow gorilla bread butter? Chickity dickity web frontend back single page I understand much
- cooperadymas 2y agoA sword is also just a knife. And a Tesla truck is just an electric go-kart.