react-native-windows 0.72.16 → 0.72.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -121,6 +121,42 @@ bool ReactSettingsSnapshot::UseDeveloperSupport() const noexcept {
121
121
  return false;
122
122
  }
123
123
 
124
+ struct WeakRefPropertyBag : winrt::implements<WeakRefPropertyBag, winrt::Microsoft::ReactNative::IReactPropertyBag> {
125
+ WeakRefPropertyBag(winrt::Microsoft::ReactNative::IReactPropertyBag propertyBag) : m_wkPropBag(propertyBag) {}
126
+
127
+ IInspectable Get(winrt::Microsoft::ReactNative::IReactPropertyName const &name) noexcept {
128
+ if (auto propBag = m_wkPropBag.get()) {
129
+ return propBag.Get(name);
130
+ }
131
+ return nullptr;
132
+ }
133
+
134
+ IInspectable GetOrCreate(
135
+ winrt::Microsoft::ReactNative::IReactPropertyName const &name,
136
+ winrt::Microsoft::ReactNative::ReactCreatePropertyValue const &createValue) noexcept {
137
+ if (auto propBag = m_wkPropBag.get()) {
138
+ return propBag.GetOrCreate(name, createValue);
139
+ }
140
+ return nullptr;
141
+ }
142
+
143
+ IInspectable Set(winrt::Microsoft::ReactNative::IReactPropertyName const &name, IInspectable const &value) noexcept {
144
+ if (auto propBag = m_wkPropBag.get()) {
145
+ return propBag.Set(name, value);
146
+ }
147
+ return nullptr;
148
+ }
149
+
150
+ void CopyFrom(winrt::Microsoft::ReactNative::IReactPropertyBag const &value) noexcept {
151
+ if (auto propBag = m_wkPropBag.get()) {
152
+ return propBag.CopyFrom(value);
153
+ }
154
+ }
155
+
156
+ private:
157
+ winrt::weak_ref<winrt::Microsoft::ReactNative::IReactPropertyBag> m_wkPropBag;
158
+ };
159
+
124
160
  //=============================================================================================
125
161
  // ReactContext implementation
126
162
  //=============================================================================================
@@ -131,7 +167,7 @@ ReactContext::ReactContext(
131
167
  winrt::Microsoft::ReactNative::IReactNotificationService const &notifications) noexcept
132
168
  : m_reactInstance{std::move(reactInstance)},
133
169
  m_settings{Mso::Make<ReactSettingsSnapshot>(Mso::Copy(m_reactInstance))},
134
- m_properties{properties},
170
+ m_properties{winrt::make<WeakRefPropertyBag>(properties)},
135
171
  m_notifications{notifications} {}
136
172
 
137
173
  void ReactContext::Destroy() noexcept {
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.72.16</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.72.18</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>72</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>16</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>18</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>36fc7ba40eb0f163dc83c652f808195fbc4b25c0</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>a4b80b743e8f0fcbf7166ecf55dcfe0b66c2d828</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.72.16",
3
+ "version": "0.72.18",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "peerDependencies": {
89
89
  "react": "18.2.0",
90
- "react-native": "^0.72.3"
90
+ "react-native": "^0.72.6"
91
91
  },
92
92
  "beachball": {
93
93
  "defaultNpmTag": "latest",