Skip to content
Merged
Show file tree
Hide file tree
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
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Fix devtools connection to match RN0.62",
"packageName": "react-native-windows",
"email": "acoates@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-04-21T16:35:21.511Z"
}
6 changes: 6 additions & 0 deletions vnext/Microsoft.ReactNative/Views/ReactRootControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,12 @@ void ReactRootControl::ShowDeveloperMenu() noexcept {
auto xamlRootGrid{xamlRootView.as<winrt::Grid>()};
xamlRootGrid.Children().Append(m_developerMenuRoot);
}

// Notify instance that dev menu is shown -- This is used to trigger a connection to dev tools
if (auto instance = m_weakReactInstance.GetStrongPtr()) {
query_cast<Mso::React::ILegacyReactInstance &>(*instance).CallJsFunction(
"RCTNativeAppEventEmitter", "emit", folly::dynamic::array("RCTDevMenuShown"));
}
}

void ReactRootControl::DismissDeveloperMenu() noexcept {
Expand Down