Why Magento 2 uses Knockout instead of Angular or React

If Magento 2 was build using react your question would be "Why doesn't it use Angular or KnockoutJs?".
If it was built using Angular....you know where this is going.

I'm not an authority on this, but I speculate it was the weapon of choice because the team was more comfortable with KOjs and it suited their needs based on their roadmap.

There was a similar debate to why choose less over sass (read more about it here: https://alankent.me/2016/05/21/magento-2-community-project-moving-from-less-to-sass/)

I also heard discussions about why ZF and not Symfony. Same thing...it's a matter of choosing the right tools suited for the job, the tools you are comfortable with.

Anyway...you are not limited too much about this choice. You can choose the tech stack, specially for frontend, that suits you best.
You may need to put in some extra effort, but you will do it only once and can reuse the results in future projects.
There are already projects out there on magento with react for example.
Here is an awesome vide from Riccardo Tempesta: https://www.youtube.com/watch?v=ElZ5UtTXpzQ
Also you can find here a proxy between react and magento: https://github.com/McFizh/magento2-react
You can find even more with a simple search online.


Don't know the official reason, but having used it, Knockout seems a lot more lightweight, loads the minimal necessary and suitable for integrating with Magento2 frontend templates than the heavier Angular or React.

Also the easy way RequireJS and gulp automatically blend with knockout to reduce load time and file sizes was probably important, am guessing, but fairly certain front end speed was a major consideration when planning out Magento2.


I believe it's the same reason they chose LESS over Sass - React didn't have a large stable community behind it when Magento 2 was first started, I'm not sure if Angular did but either way I've heard Angular is quite complex and would seem overkill for Magento in my opinion.

Knockout is lightweight, isn't overkill and meets the requirements Magento had at the time.

There is a React based progressive web app (PWA) version of Magento which we should be able to checkout at some point this year but there is no release date as it's in an early concept stage from what I can see. For info on that see here.