On my daily job I work on a typical Rails monolith app that uses rail for the API and business logic layer, and serves a SPA built in React.
The more my team and I work on the SPA side, the more I have the feeling that we are only really using the dynamic content loading and routing parts of a SPA, and the team that originally built this app could have gotten away with a much simple approach of using Rails views with sprinkles of React for the niceties it provides, like component state management, styled components, component libraries and so on.
I was first introduced to programming through JavaScript, and not very long after my initial introduction, I picked up React, and most online tutorials focused on building SPAs, so I had a hammer and everything looked like a nail. These days I am very reluctant to build a single page application for my own projects, and tend to only build a SPA when I want a completely decoupled API, but that is rarely the case, as the added complexity almost never adds enough benefits to justify it.
What do you guys think? Are we as an industry overusing SPAs, or are there legitimate reasons to always rebuild the browser's apis inside our javascript applications?
A thing that is hard to replicate without SPA is
Is there a meaning to <Link> in Gatsby.js, and is there something analogous for other SSG?
Pacharapol Withayasakpunt ・ Mar 15 ・ 1 min read
Otherwise, to me yet, SPA is just analogous to some template engine, like EJS or Jinja2.