Skip to content

Commit

Permalink
Fix issue when calling arrange on an RN Island during load (#14362)
Browse files Browse the repository at this point in the history
* Fix issue when calling arrange on an RN Island during load

* Change files

---------

Co-authored-by: Tatiana Kapos <[email protected]>
  • Loading branch information
acoates-ms and TatianaKapos authored Feb 27, 2025
1 parent c8de27f commit ce99a08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Fix issue when calling arrange on an RN Island during load",
"packageName": "react-native-windows",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ winrt::Windows::Foundation::Size ReactNativeIsland::Measure(
facebook::react::LayoutConstraints constraints;
ApplyConstraints(layoutConstraints, constraints);

if (m_isInitialized && m_rootTag != -1) {
if (m_isInitialized && m_rootTag != -1 && m_hasRenderedVisual) {
if (auto fabricuiManager = ::Microsoft::ReactNative::FabricUIManager::FromProperties(
winrt::Microsoft::ReactNative::ReactPropertyBag(m_context.Properties()))) {
facebook::react::LayoutContext context;
Expand Down Expand Up @@ -809,7 +809,7 @@ void ReactNativeIsland::Arrange(
facebook::react::LayoutConstraints fbLayoutConstraints;
ApplyConstraints(layoutConstraints, fbLayoutConstraints);

if (m_isInitialized && m_rootTag != -1 && !m_isFragment) {
if (m_isInitialized && m_rootTag != -1 && !m_isFragment && m_hasRenderedVisual) {
if (auto fabricuiManager = ::Microsoft::ReactNative::FabricUIManager::FromProperties(
winrt::Microsoft::ReactNative::ReactPropertyBag(m_context.Properties()))) {
facebook::react::LayoutContext context;
Expand Down

0 comments on commit ce99a08

Please sign in to comment.