Before you decide on a framework for your frontend project, there are a few things to take into consideration. How complex is your project? How many developers are working on it? Do you need the flexibility to build both a web app and a mobile app? Do you need to incorporate a CMS?
In general, you should choose the framework that is easiest to get up and running and adds the least weight to your project, while still giving you the features you need. With that said, let’s take a look at some options.
One of the drawbacks of using Angular is its somewhat steep learning curve, and large package size compared to React.
React is one of the most popular JS tool out there today. It’s technically not a framework, but a library of UI components. It’s well-documented and has been around since 2013. There are hundreds of libraries out there that make developing with React easy, including Create React App, which will get your dev environment up and running in minutes.
React makes changes to individual elements on the page through a virtual DOM. It uses JSX, a declarative HTML-like syntax that allows you to create discrete UI components. The component model makes reusing and testing code extremely easy.
Vue also relies on a virtual DOM but uses HTML templates instead of JSX components as its building blocks. Vue uses Angular’s directive binding to hydrate templates with data.
Gatsby is a React-based framework that generates static sites and can also be used to build progressive web apps. Gatsby integrates easily with content management systems and provides pre-made building blocks for common use cases.
Under the hood, Gatsby relies on React to build, bundle and serve static HTML pages. Once as much content has been statically generated as possible, client-side React picks up where Gatsby left off, giving a Gatsby page as much power and flexibility as a traditional React PWA.
Some of the most popular features of Ember include the Ember inspector tool and Ember Simple Auth, which abstracts away the complexity of user authentication. While not as popular as React or Vue, it’s a great option for building functional, easily maintained web apps.