Most active commenters
  • _heimdall(4)
  • gloosx(4)

←back to thread

214 points stefankuehnel | 27 comments | | HN request time: 0.612s | source | bottom
1. attah_ ◴[] No.41840608[source]
So let me get this straight... PayloadCMS is a framework, for Next.js which is a framework for the React framework.

Yo dawg, i heard you like frameworks!

replies(4): >>41840780 #>>41840997 #>>41841176 #>>41842441 #
2. _heimdall ◴[] No.41840780[source]
"Framework" isn't really the best term for them to actually use to describe Payload. Its basically a tool for NextJS developers to quickly build a custom CMS. I'd think of it more like CMS-in-code than a framework.
3. cle ◴[] No.41840997[source]
Yes? I think this is great. IMO our goal should be to enable building higher-level abstractions on lower-level ones.
replies(1): >>41841257 #
4. mzronek ◴[] No.41841176[source]
A common misconception. React is a library.

These are examples for 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.

replies(5): >>41841381 #>>41841800 #>>41842287 #>>41843339 #>>41843533 #
5. jstummbillig ◴[] No.41841257[source]
Sure, if the lower level is stable. Nothing in this chain is close to stable.
replies(1): >>41841602 #
6. vasergen ◴[] No.41841381[source]
> React is a library

Can a library have compiler?)

replies(2): >>41841594 #>>41847417 #
7. robertlagrant ◴[] No.41841594{3}[source]
That's an optional step for JSX cross-compilation. It's a language plugin; nothing really to do with frameworks or libraries.
replies(2): >>41842274 #>>41843393 #
8. aduffy ◴[] No.41841602{3}[source]
React is arguably quite stable?
replies(1): >>41841841 #
9. flockonus ◴[] No.41841800[source]
React 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.

replies(1): >>41842111 #
10. jstummbillig ◴[] No.41841841{4}[source]
RSC was marked stable in Mid 2022 and this major change is still in the process of unfolding through the ecosystem, because of course these things take time. And even though react might be the future, I have a hard time understanding a client side framework that currently becomes more of a server side framework being stable.
replies(1): >>41842048 #
11. zztop44 ◴[] No.41842048{5}[source]
By that standard, nothing is stable. New features are added to HTML, the Linux kernel, x86, PHP, etc all the time. In fact, building on top of higher level abstractions can sometime insulate your application from this change too.
12. math_dandy ◴[] No.41842111{3}[source]
React is a FEBEFUIRT - a FrontEnd/BackEnd-Fluid UI RunTime.
13. ◴[] No.41842274{4}[source]
14. meiraleal ◴[] No.41842287[source]
React 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.
replies(2): >>41843397 #>>41847475 #
15. mrexroad ◴[] No.41842441[source]
s/framework/abstraction/g

With that said, yep, I do like robust/stable and purposeful abstractions.

16. _heimdall ◴[] No.41843339[source]
React 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.

replies(2): >>41843692 #>>41847473 #
17. tmtwhn ◴[] No.41843393{4}[source]
They're going further than jsx transpilation[1]

[1] https://react.dev/learn/react-compiler

replies(1): >>41849546 #
18. sneek_ ◴[] No.41843397{3}[source]
I 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.

19. cooperadymas ◴[] No.41843533[source]
A sword is also just a knife. And a Tesla truck is just an electric go-kart.
20. threetonesun ◴[] No.41843692{3}[source]
Hard to call something a full blown front end framework when it doesn’t have routing.
replies(1): >>41844277 #
21. _heimdall ◴[] No.41844277{4}[source]
Routing 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.
22. gloosx ◴[] No.41847417{3}[source]
Javascript 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.

23. gloosx ◴[] No.41847473{3}[source]
Can you please guide me where this heresy is being spread?
replies(1): >>41848020 #
24. gloosx ◴[] No.41847475{3}[source]
Can you please guide me where this heresy is being spread?
25. _heimdall ◴[] No.41848020{4}[source]
You heard it here first, I'm officially breaking the story wide open.
replies(1): >>41856279 #
26. zdragnar ◴[] No.41849546{5}[source]
Nothing 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.

27. gloosx ◴[] No.41856279{5}[source]
From 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