Before asking how to choose a JS framework

I have heard a lot of people asking about what’s difference between React.js and Angular 4, how to choose a JS framework, etc.

Yes, JS frameworks are booming these days. And there are a lot of articles, performance comparison sheets on the internet. For the current situation, I would say, it’s not that important to choose a framework. The important thing is how you are going to write the code, whether the code is reusable in different conditions, whether it is easy to add or change functions in the application.

I have tried changing React.js components to Angular 4 components. It’s not that hard. JSX can be translated to template, event handlers can be used directly, if you decoupled Model layer and View Layer in a clean way. Of course, it’s not a big project. Just something like 20 components. But you have to know how Angular 4 components, provider, directives work (compared to this, React.js has only one concept to learn: component).
Why I changed from React.js to Angular 4 is mainly because it’s better to keep one tech stack in one project, no matter whether you like the framework or TypeScript, or bootstrap.

Basically, all the frameworks can be used to build the web app, and if you see the architecture, they are more or less the same. But behind it, you have to follow some rules, like keep one source of truth, make the data flow consistent etc.

And also, we can choose pure JavaScript to build everything. And it will be the fastest one, if you build it properly. Then it comes back why we use JS frameworks => Frameworks can help us to make the application architecture clean, help a lot. Another advantage is they can help us focus on the function, not something else.

It’s good to learn a lot of frameworks and find out what’s the pros and cons. Like Vue.js, I should say it’s a good example that we can use simpler solution to make everything work, compared to the complex Angular 4 solution.

If you see the components structure in Angular 4, Polymer and Vue.js, you will find a lot of similarities. Obviously, they learn from each other. And we should learn from them too. :)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.