React (and Vue, et al) was built with client side rendering in mind. It just does not seem to fit the server side rendering pattern.

What are the use cases? From my perspective, if your app is a rich web app with a lot of interactivity, you probably want CSR and don’t benefit much from SSR.

If you have a content-centric site, or a site with some interactivity but not much, you want a static site generator, or SSR. But in that case, a template engine with some smaller client side libraries (jQuery or AlpineJS or idk what all is out there).

Using React SSR for all of these seems like the wrong tool. What am I missing?

  • lysdexic@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 年前

    Is it not generating HTML on the server to be served to the client?

    No, it generates the code that creates the DOM, sets the application state based on the user’s setting, and updates the webapp to resume working in a consistent state.

    It basically sends a frozen instance of a full blown JavaScript application.

    What you’re describing is, in my opinion, an overly complicated form of dynamically rendering HTML on the backend.

    That’s because you’re oblivious to the problem domain,and thus you’re falling back to the unrelated but similar sounding things you’re familiar with to fill in the void of your understanding of the actual problem.

    Anyway, that’s my opinion on the matter

    My point is that your opinion is a misinformed one,and really doesn’t hold up to scrutiny.