Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the reason why people haven't turned to Svelte yet?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "what is the reason why people have not turned to Svelte". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the reason why people have not turned to Svelte?"

Svelte is a lightweight component-based framework, such as React, Vue, or Angular, that allows developers to write easy-to-read code in JavaScript and then compile it into efficient JavaScript that runs super fast in browsers.

When other frameworks (such as React) adopt virtual DOM diffing technology, Svelte compiles your code into JavaScript, and DOM is updated when the state in your component changes.

Since it was first released by Richard Harris in November 2016, many developers have fallen in love with this new way to build applications, with more than 39000 stars in their official Github repository and winning a place in the choice of top JavaScript front-end frameworks.

Despite the data, many people are hesitant to adopt the Svelte framework during the front-end development process.

According to trends.buildwith.com, as of October 2020, only about 6000 registered live and history sites used Svelte as the preferred front-end library. Compared with about 3.4 million of React, more than 1.5 million of Vue, and more than 3.7 million of Angular, this figure is extremely low.

Why developers haven't switched to Svelte yet

(1) belated TypeScript support

For example, when you come out of a framework like Angular, you will be used to preset a TypeScript development environment for you out of the box. The Svelte team just released an update that includes official support for TypeScript in July 2020.

This means that developers can now run the following command to set up TypeScript when creating a Svelte project:

Npx degit sveltejs/template svelte-typescript-app cd svelte-typescript-app node scripts/setupTypeScript.js

Although TypeScript can be used in advance, the initial setup process is cumbersome because it involves a bunch of time-consuming custom Webpack and Svelte preprocessing configurations. Svelte now includes TypeScript support by default, which is a good thing, as this major missing point seems to be one of the factors that prevent developers from learning and using the framework. When Deno was officially released some time ago, one of the key selling points considered by developers was its advantage over Node's TypeScript integration.

(2) there is no official CRA or Svelte CLI

If you need to quickly build a scaffolding for a React application, you can easily use the create-react-app CLI app (given that it has been installed around the world), and simply run the create react app myreactproject command to automatically generate the application scaffolding for you.

For Vue, the process is similar, as long as you have Vue CLI installed on your machine, you just need to run this command and your scaffolding is set up.

Vue init myvueproject

However, Svelte does not have an officially maintained CLI application for the scaffolding project because the svelte/cli package was abandoned in 2018.

You need to always extract scaffolding templates from its npx repository (which has integrated CLI). This means that every time you want to create a Svelte application, you need to always run the following command to set up a Svelte project.

Npx degit sveltejs/template my-svelte-project cd my-svelte-project npm install npm run dev

Although this may seem like a small DX (developer experience) flaw, it is definitely a problem that the Svelte team can study.

(3) small communities

Compared with other major front-end development frameworks, Svelte has a very small community. If you use a popular language with a large community, you are more likely to find people who need to work with, and you are more likely to find references and resources.

On Stack Overflow, for example, there are only more than a thousand discussions (questions and answers) under the Svelte tag. Compared with 250000 + of React, 234000 + of Angular, and 64000 + of Vue, there is still a lot of work to be done. This means that if you have problems using Svelte as a developer, your chances of getting help are relatively small.

(4) less packaging / tool support

Many developers find that integrating existing packages helps to achieve tasks faster. Due to the low penetration of Svelte, there is less support for packages and utilities. For example, if you want to implement a date-picker component in React, there are hundreds of packages to choose from in the NPM repository. However, you don't have this luxury with Svelte, because there are few features available for developers to choose from, so developers usually take the time to implement them from scratch.

(5) the demand of the industry is low.

If the employer has enough demand for a tool, it makes sense for developers to learn the tool. As a developer, if it is profitable to learn a tool, you will want to gain knowledge of it.

Svelte is relatively young in the JavaScript world, so there is little demand for Svelte developers in the industry, because many companies have not yet adopted Svelte in their infrastructure.

Why don't companies switch to Svelte?

(1) support from the company

React is strongly supported by Facebook because it was originally developed by Facebook employees, and Angular's development team is led by Google developers who also use Vue on their professional websites. Apple, for example, also uses Vue on their SwiftUI tutorial website. However, Svelte does not have the obvious support of these big technology companies. I firmly believe that if Svelte is supported by these companies, more companies will start to adopt Svelte. If any of these companies adopt or support the framework in their infrastructure, Svelte's popularity could soar.

(2) maturity

If a technology has been around for a long time, it is considered more reliable than its counterpart, because over time, the technology will continue to improve with bug fixes, more documentation and tutorials, and improvements in language syntax and security.

Since Svelte (released in 2016) is younger and relatively new than React, Vue, Angular and other front-end frameworks, it is normal to worry about its maturity to some extent. It is believed that many companies are skeptical about the security of building products using Svelte because of their age.

(3) finally

Judging from the current popularity and usefulness, there is no doubt that Svelte is an important part of future web development. As a Svelte developer, it would be great for more companies and developers to adopt Svelte and all its beauty as their choice for making front-end Web frameworks for Web applications.

Thank you for your reading, the above is the content of "what is the reason why people have not turned to Svelte". After the study of this article, I believe you have a deeper understanding of the reason why people have not turned to Svelte, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report