Stop saying Microsoft Teams is being rewritten from Electron to React
This is a bit of a ranty blog post, but I need to get something off my chest.
I hear a lot of people saying that Microsoft Teams is being re-written “from Electron to React”. I hear both technical and non-technical people saying it. I hear tech journalists saying it. I hear Microsoft folks saying it. But, it’s not true. It doesn’t make sense. Please, don’t take this the wrong way – but hear me out and let me explain what (I think) is happening.
Why everyone got confused
There are two things happening at the same time.
1 – The Electron technology is being replaced by a different thing.
Electron is what lets the Teams engineering team take what you see at teams.microsoft.com* – a web application – and make it into a desktop application. Electron hosts the web application in a little box on the desktop and has done since Teams launched – here’s what I wrote about it in 2017. It’s a wrapper, and it’s being replaced. Instead, the team are going to make heavy use of WebView2. This is a control that people who make desktop applications can use to show the contents of a web page or even a full web application like Microsoft Teams. I go into this in loads more detail on another blog post, but that’s what’s happening. Electron is being replaced by a new desktop application that will still host the teams.microsoft.com experience in a desktop application.
That change could have been the only thing that happened: it’s completely separate from the other change, which is…
2 – Teams is being rewritten in React.
When Microsoft Teams was first written, Angular was chosen as the framework to use. Over the years that decision has come to be seen as the wrong one and React has emerged as the favoured choice. The new Teams client featuring in Windows 11 is written in 100% React, with no Angular parts. Choosing to use React matches up with other teams in Microsoft which also favour React: see Fluent UI, OfficeUI, Azure Communication Services UI etc. It really feels like Microsoft have “chosen” React as their preferred web framework technology.
So, you see, it doesn’t make sense!
This is why saying Teams is going “from Electron to React” doesn’t make any sense. It can’t go from a desktop wrapper technology to a web framework. Things you can confidently say instead:
- Teams is going from Electron to using WebView2 (to host the teams web app)
- Teams is being rewritten from Angular to React
- Teams is replacing their application hosting technology AND rewriting their web code base
Please, let’s all stop replacing a desktop container technology with a web framework! And, if you hear someone say that Microsoft are “replacing Electron with React in Teams”, send them here 🙂
* ok, I know it’s not exactly the same code base because the desktop experience is slightly different from the web one sometimes, but there’s a load of overlap and shared components that make it considerably easier to manage than if 100% of the code for the desktop client was separate from the code for the web client. Can we agree on that?