4 ms·
Still dont know what RSC is from this page. As a lisp developer and not a javascript developer, I don't understand how onclick ends up with '/js/chunk123.js#o
by worthless-trash 1y ago
Still dont know what RSC is from this page. As a lisp developer and not a javascript developer, I don't understand how onclick ends up with '/js/chunk123.js#onClick'
Maybe this is more meaningful for javascript developers. It makes little sense to me.
- jjraden 1y agoI'm guessing they mean React Server Components, but yeah, it annoyed me too that not only do they not define the acronym, but it appears only once on the page -- the title -- so that it's harder to infer it from context.
- danabramov 1y agoGreat callout, thanks! Edited. I meant the article more as "if you're already curious about the RSC model and have some LISP background" rather than an introduction to what RSC is, but hopefully spelling it out at least helps with that context.
- danabramov 1y agoWhen a compiler sees an import to a module with “use client”, it substitutes it with this reference. So the server code only sees the reference. Whereas the compiler also takes this as an instruction to bundle the code from that entry point. (Which ensures this reference actually corresponds to a file that will exist.) Does this make sense? Like I said, I might be stretching the analogy, but it’s a bit like quoting except at the module system level (and in practice mostly happening at the build time). I've edited the post to clarify this a bit.
- worthless-trash 1y agoThanks, that makes more sense.
- owebmaster 1y agoThere is a weird push/rebranding of React to actually run in the server, like Ruby on Rails or Django. > It makes little sense to me. You are not alone and I've been coding JS for the past 20 years. Well, it makes little technical sense to me but it is not difficult to find where it might makes more sense.