My tech choices for building a modern SPA

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • react-query

    Discontinued 🤖 Powerful asynchronous state management, server-state utilities and data fetching for TS/JS, React, Solid, Svelte and Vue. [Moved to: https://github.com/TanStack/query]

  • I favor Hooks and function components over class components. Hooks let me concisely encapsulate stateful logic. The ecosystem has moved towards them too. For example, the excellent react-query library uses a hook interface.

  • Tailwind CSS

    A utility-first CSS framework for rapid UI development.

  • TailwindCSS has gained popularity and looks great. But I don’t have enough experience with it yet to consider switching my default away from Bootstrap.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • typestyle

    Making CSS Typesafe 🌹

  • I like TypeStyle for component-scoped styling. With TypeStyle, I can use the full power of a programming language (TypeScript) to build up my styles and share them among components. And I can nicely co-locate the styles in the same file as my components.

  • Recoil

    Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.

  • If I do need shared client state, Redux works fine, but I have started to prefer Recoil. With Recoil, you don’t have to write reducers and actions. You can treat Recoil atoms like a shared useState. That reduces the code volume and ceremony needed to manage shared state. So my first choice is Recoil. It's pretty new though, so for more conservative projects, I choose Redux.

  • jest-dynalite

    Jest preset to run Dynalite (DynamoDB local) per test runner

  • For unit tests, Jest is the way to go. It’s snapshot test feature is particularly useful, for both frontend and backend unit testing. And it has useful presets from the community, for example jest-dynalite for DynamoDB testing.

  • react-bootstrap

    Bootstrap components built with React

  • I default to react-bootstrap. This gives me a fine suite of buttons, form inputs, modals, etc. that give attention to aria attributes and use Bootstrap styles.

  • husky

    Git hooks made easy 🐶 woof!

  • I configure a git commit hook with Husky runs the linter and runs the test suite. That way I can’t commit code that doesn’t pass those checks. This is particularly useful when working on a team.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • jest

    Delightful JavaScript Testing.

  • For unit tests, Jest is the way to go. It’s snapshot test feature is particularly useful, for both frontend and backend unit testing. And it has useful presets from the community, for example jest-dynalite for DynamoDB testing.

  • Bootstrap

    The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

  • I default to Bootstrap. Bootstrap has served me well through years of usage. It's a mature library, allows customization, takes accessibility into account, and has corresponding component libraries like react-bootstrap.

  • react-final-form

    🏁 High performance subscription-based form state management for React

  • For forms, I default to react-final-form. React-final-form comes from the creator of the redux-form library, Erik Rasmussen. He has taken lessons learned from redux-form and applied them to final-form.

  • create-react-app

    Set up a modern web app by running one command.

  • Instead of setting up Webpack, TypeScript, and so on from scratch, I use create-react-app (CRA). You’d have to have an extremely unusual use-case to set up Webpack config from scratch. (Almost) nobody should do that anymore.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts