Hacker News new | ask | show | jobs
by aeoleon 2308 days ago
I disagree. I think SPA's are fantastic. Sure, they can be misused, but so can most things.

I'm an intermediate level web developer. I enjoy working with ReactJS-- I like that it's a framework and way of doing things.

1. manages to accomplish everything that I need to get done

2. has a huge community & huge amount of open source reactjs components available

3. is highly customizable

If one isn't going to use a modern, prolific SPA framework such as Vue/Angular/React, other options seem to be:

1. Vanilla JS (potentially a mishmash of vanilla JS + CDN/local js libraries)

2. jQuery

3. other jQuery-era frontend frameworks

ReactJS in my experience makes development faster, easier, better organized and more enjoyable.

4 comments

I don't think that SPA's are necessarily bad, just that they are used in places where server side rendering would work just as well for a lot less effort. Use the right tool for the job.

> ReactJS in my experience makes development faster, easier, better organized and more enjoyable.

Maybe it makes development faster, but in my experience it makes debugging someone else's code a whole lot more difficult. CSS for example. It seems nice to define the style in the same file as the component code and it makes development a little bit faster. But when you have to debug, it's far easier to have styles defined in classic stylesheets in a different file rather than trying to track down the location of some dynamically generated CSS class. (I know as I have been degugging code that was written by an agency, and the CSS styles are defined in a mix of both React files and normal CSS).

From your list of benefits I don't see anything that couldn't be achieved with sever side rendering and a bit of jQuery. If your front end needs to have a lot of user interaction, then SPA's will be the correct tool for the job. For most web apps they are overkill.

The React frontend we have at my current workplace is incredibly bloated compared to a similar complexity website I created using Django and Jquery. Doing certain simple tasks is like pulling teeth.

I think you are confusing frameworks and SPAs.

For example, React is meant to build small components not SPA. But you can build a SPA using react-router. But you can build SPAs using vanilla JS as well.

The only thing that truly defines SPAs is lack of “true” page changes. JS is taking control of your browser url bar and history. Which I personally dislike.

> React is meant to build small components not SPA

React is meant to build (composable) user interfaces.

What about the server-side of things? If you only have to the UI sure, but if you have to write the whole thing, rails/django is going to be way less work. No need for an intermediate network JSON API with all the encoding/decoding that it entails, just routing on one side instead of two and many more.
This.

Why do we need frontend routing?

> ReactJS in my experience makes development faster, easier, better organized and more enjoyable.

Cool.

What's the worst thing about React?