Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ struct WindowData {
}

void UpdateViewOptions() {
if (!m_appName)
if (!m_appName || !m_compRootView)
return;

winrt::Microsoft::ReactNative::ReactViewOptions viewOptions;
Expand Down Expand Up @@ -263,12 +263,12 @@ struct WindowData {
winrt::Microsoft::ReactNative::ReactCoreInjection::SetTopLevelWindowId(
host.InstanceSettings().Properties(), reinterpret_cast<uint64_t>(hwnd));

// Nudge the ReactNativeHost to create the instance and wrapping context
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am just curious why this change is considered to be correct?
How the view options are updated if they are changed after the instance reload?
The PR description says nothing about it.

host.ReloadInstance();

for (auto &window : g_windows) {
window->UpdateViewOptions();
}

// Nudge the ReactNativeHost to create the instance and wrapping context
host.ReloadInstance();
}

break;
Expand Down
Loading