Andrey (azangru) wrote,
Andrey
azangru

There's this strange thing going on: React-based tools, such as Next.js and Gatsby, are begrudgingly acknowledging that React is a pretty hefty library, and are introducing options to remove it (along with the rest of javascript?) at build time or before sending the page to the browser.

Which kinda transforms React from a client-side or universal component library into just a server-side templating library.

This is understandable, given that it removes around 30-40 kB or React and all other bytes of imported libraries; but what weirds me out is why, if this is the case and if this is important for your project, use React at all. If you don't need it on the client, why have it on the server? Is it that much superior than, say, nunjucks?

I appreciate that it's probably easier (probably; perhaps nunjucks has an answer to that) to deal with assets such as css or images by hijacking javascript imports in something like React components, and offloading all the processing and linking work to something like webpack; but if you actually want to use some javascript on your page, aren't you now in a rather insane territory when you have one client-side javascript framework on the server, and a completely different, lighter-weight, javascript solution on the client? Wasn't "isomorphism", i.e. ability to run the same code both on the client and on the server, one of the selling points of React, Vue, Svelte et al?



Subscribe

  • (no subject)

    (retweeted by a developer) How does she interpret what she has highlighted — "unlawful blocking of a public street" — as "pedestrians whose…

  • (no subject)

    Google has finally become ready to promote its Lit ecosystem properly. I thought they were going make their announcements at the coming Google IO;…

  • (no subject)

    Is it ... Bill Maher? Is he, in the penetrating eyes of this insightful lady, the emblem of white supremacy now? The comments to the tweet say it…

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments