Closed wecliang closed 3 years ago
When I run the project , it crashed( WinRT originate error - 0x8001010E
This error code indicates RPC_E_WRONG_THREAD
, as in there is code that is supposed to execute on the UI thread that is not. If you were updating your app from a previous version to 0.64+, you may be running into the change in thread affinity (see breaking changes here). Check the thread your error is originating from and your potential fix is to use the dispatcher to execute it on the UI thread (check docs for more info like this).
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 14 days of this comment.
In UWP applications, each top level window (CreateNewView
) gets its own UI thread. A react-native instance can only be run against a single UI thread. So to have two top level windows use RN content, you'll need to have two seperate RN instances running. (So two ReactNativeHost
s)
I have ask question about “How to use react-native-windows to support multiple screens to display different contents #8309”,and I follow the suggest。
Now I have create two pages for different use and show them at the same time。But there seems something wrong with the render() method。I need some help。
First I regist two rn component at index.js
Second I create two pages.
MainPage.xaml
MainPage.cpp
SceondScreenpage.xaml
SceondScreenPage.cpp
And this is how to create tow screens。I write it in App.cpp
App.cpp
When I run the project , it crashed( WinRT originate error - 0x8001010E : ). It seems like I should create two "appXXX" for different use? One for companent "shopClient",and another for "RNCompanent"? I don't know the real reason. Any help???