Skip to content

Best way to use a Win32 API #13908

Answered by acoates-ms
shirakaba asked this question in Q&A
Discussion options

You must be logged in to vote

With the new architecture we are going to be moving React Native Windows away from UWP to be a Win32 process on top of WindowsAppSDK. Given that, depending on the size of the app and state of it, I'd probably look into hosting your existing old architecture RN within a Win32 app using Xaml Islands.

https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/xaml-islands/using-the-xaml-hosting-api

The ReactRootView control is a standard WinUI 2 Xaml control so you can host it inside a Win32 HWND using the above Xaml hosting. That way your app will already be a win32 app when it comes time to move to the new architecture, and you can use all the Win32 APIs.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shirakaba
Comment options

Answer selected by shirakaba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants