private void DetachViewFromInstance(ReactRootView rootView, IReactInstance reactInstance) { DispatcherHelpers.AssertOnDispatcher(); if (-1 != rootView.GetTag()) { reactInstance.GetJavaScriptModule <AppRegistry>().unmountApplicationComponentAtRootTag(rootView.GetTag()); } // timming issue Thread.Sleep(2 * 1000); }
private void DetachViewFromInstance(ReactRootView rootView, IReactInstance reactInstance) { DispatcherHelpers.AssertOnDispatcher(); reactInstance.GetJavaScriptModule <AppRegistry>().unmountApplicationComponentAtRootTag(rootView.GetTag()); }
private async Task DetachViewFromInstanceAsync( ReactRootView rootView, IReactInstance reactInstance) { DispatcherHelpers.AssertOnDispatcher(); // Detaches ReactRootView from instance manager root view list and size change monitoring. // This has to complete before unmounting the application. // Returns a task to await the completion of the `removeRootView` UIManager call (an effect of // unmounting the application) and the release of all dispatcher affined UI objects. var rootViewRemovedTask = await reactInstance.GetNativeModule <UIManagerModule>() .DetachRootViewAsync(rootView); reactInstance.GetJavaScriptModule <AppRegistry>().unmountApplicationComponentAtRootTag(rootView.GetTag()); await rootViewRemovedTask; }
private void DetachViewFromInstance(ReactRootView rootView, IReactInstance reactInstance) { DispatcherHelpers.AssertOnDispatcher(); reactInstance.GetJavaScriptModule<AppRegistry>().unmountApplicationComponentAtRootTag(rootView.GetTag()); }