Skip to content

Instantly share code, notes, and snippets.

@bmaupin
Last active May 7, 2025 14:46
Show Gist options
  • Save bmaupin/25e7bf945f3f06ec4de884c840177097 to your computer and use it in GitHub Desktop.
Save bmaupin/25e7bf945f3f06ec4de884c840177097 to your computer and use it in GitHub Desktop.
Thoughts on JavaScript frameworks

Recommendations

1. Full-stack vs. frontend

First, you need to decide if you need full-stack or just a frontend framework.

Most people should use a full-stack framework and not a frontend framework by itself. This allows anything sensitive such as API secrets to be handled on the server.

There are some situations in which a web application could securely use a frontend framework alone, although these are less common. This would require that the app delegate authentication to a third party and that auth be used to access APIs so that no sensitive information would ever need to be stored in the frontend.

2. Pick a frontend framework

Even if you're using a full-stack framework, you should pick which frontend framework you want to use since the current full-stack frameworks are designed for or on top of specific frontend frameworks.

  • If you want to benefit from the largest frontend ecosystem and pool of experienced developers, React is the best choice as it's the current de-facto standard frontend framework.
  • If you want to focus on performance and don't mind giving up the benefits of the React ecosystem, Svelte is the best choice.
  • If you want performance without straying too far from the React ecosystem and don't mind bleeding edge, Solid.js is a good choice.

3. Pick a full-stack framework

If you have a lot of static content, Astro is the best choice.

If you mostly have dynamic content:

  • If picked React for your frontend framework, React Router (formerly called Remix) is the best choice.
  • If you picked Svelte for your frontend framework, Svelte's own SvelteKit is the best choice.
  • If you picked Solid.js for your frontend framework, Solid's own SolidStart is the best choice.

More notes on full stack frameworks

React Router (formerly called Remix)

Full-stack framework based on React

  • Built in response to perceived shortcomings of Next.js
  • Built by a team with a long history of React framework experience
  • Supports server-side rendering out of the box

Server-first framework with the goal of minimal JavaScript in the browser

  • Focuses on static-site generation, but server-side rendering is available as an option
  • Supports a number of different frameworks (React, Vue, Svelte, Solid.js, etc.)
  • Best suited for sites with a lot of static content

Next.js (Not recommended)

One of the first full-stack frameworks based on React

SvelteKit

Svelte's own full-stack framework

Full-stack React framework based on TanStack Router

  • While technically capable, not recommended over React Router as it lacks widespread adoption and more importantly is a solo project from one developer

More notes on frontend frameworks

ⓘ Some are starting to call these front-end frameworks "libraries," indicating they should not be used on their own but as part of a larger (normally full-stack) framework. This is a recent trend.

Still the de-facto standard as of the time this page was last updated

Diverges somewhat from the React API by adopting signals, which give more control over when components re-render

  • Takes a lot of the good from React (JSX, one-way data binding) but changes how components are rendered for better control and performance
  • Faster than React
  • Uses JSX, like React
  • No virtual DOM

More lightweight and performant than React (hence the name)

  • Somewhat lower learning curve than React and similar frameworks
    • Svelte was initially much simpler than React but with more recent versions (like v5) it has added some of the complexity of React while still remaining more performant
  • Not related to React, so has a completely different API (as compared to Solid.js/Qwik which have React-like APIs)
  • Doesn't use JSX
  • Two-way data binding
  • No virtual DOM

Supposedly faster than React (hence the name) but with a very similar API

  • Speed seems to be due to out-of-the-box features like resumability, lazy execution, etc.
  • Doesn't seem like it really differentiates itself enough from React to pull people away from it
    • Those looking for something similar to React but faster might be better served by Solid.js
    • Those looking for something different from React and faster might be better served by Svelte
  • Uses JSX, like React
  • Uses virtual DOM, like React

Lightweight library for integrating interactive elements in HTML

  • Unlike most of the other frameworks, this one actually is more like a library
  • Built on JavaScript but doesn't require writing JavaScript
    • Interactivity comes by using specific custom HTML attributes
    • These elements interact with the web server, which can be JavaScript (e.g. Node.js), but this isn't a requirement

Framework based on web components

Other notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment