News for hackers. Stuff that matters.
Re:MS Teams Switches from AngularJS to React, Ditches Electron. by jmkni on Friday June 25, 2021 @02:19PM (#27634471)
I'm using WebView2 on a project at the moment, inside a WPF (dotnet core) app.

One thing I've been having some fun with is the ability to host a REST dotnet core API inside the same application and then calling Javascript functions/updating the UI on an HTTP request.

It's very handy if you have multiple applications on the same machine (or the same application on multiple machines on a LAN) and you want them to talk to each other.

Also, I couldn't find a way to build a normal Windows installer with Electron (if there is please let me know), but was able to use Wix to build one for my WPF/WebView2 app.

Re:MS Teams Switches from AngularJS to React, Ditches Electron. by nerdywordy on Friday June 25, 2021 @03:02PM (#27634940)
Intrigued by this approach!

Is the source shareable?

We have an enterprise app that was originally built as a UWP application via Xamarin.Forms (Hot mess, I know. But the decision predates me).

We've been prototyping a rebuild in React and Electron but if we could port into WebView2 and reuse a lot of our existing business logic with a port into a local api layer a lot of time could be saved.

I'm a web guy, so not sure how the nuts&bolts of this would work. Does the WPF app bootstrap a REST API on localhost on startup that is callable?

Re:MS Teams Switches from AngularJS to React, Ditches Electron. by jmkni on Friday June 25, 2021 @03:04PM (#27634957)
I'll fire a POC onto Github and edit this comment with the link...

Edit: Here you go - https://github.com/jmkni/HnPocWebview2

Re:MS Teams Switches from AngularJS to React, Ditches Electron. by moogly on Friday June 25, 2021 @02:31PM (#27634602)
> I couldn't find a way to build a normal Windows installer with Electron (if there is please let me know)

https://www.electronforge.io/config/makers

- WiX MSI

- Squirrel.Windows

Are your options here. I had more luck with Squirrel than WiX.

With auto-update support.

Re:MS Teams Switches from AngularJS to React, Ditches Electron. by jmkni on Friday June 25, 2021 @02:40PM (#27634702)
Oh nice, will keep this in mind, thanks