@leonsilicon/react-native-wishlist 0.0.4 → 0.0.5

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.
@@ -183,14 +183,22 @@ Value ShadowNodeBinding::get(Runtime &rt, const PropNameID &nameProp) {
183
183
  auto newChildren =
184
184
  std::make_shared<std::vector<std::shared_ptr<const ShadowNode>>>();
185
185
 
186
+ // Items in `subItems` come from `pool.getComponent(type)`, which
187
+ // already returns a fresh deep-copy of the registered template (with
188
+ // unique negative react tags). Re-copying here would generate yet
189
+ // another set of tags, and the nested `ShadowNodeBinding`s (e.g. a
190
+ // `Wishlist.Pressable` inside the child template) still point at the
191
+ // pre-copy shadow nodes — so callbacks and gesture handlers registered
192
+ // against the binding's tag never reach the mounted UIView (RNGH on
193
+ // iOS looks the view up via the new tag and finds nothing). Reuse the
194
+ // bindings' existing shadow nodes directly to keep the tags stable
195
+ // through to mount.
186
196
  for (int i = 0; i < subItems.size(rt); ++i) {
187
197
  std::shared_ptr<ShadowNodeBinding> child =
188
198
  subItems.getValueAtIndex(rt, i)
189
199
  .getObject(rt)
190
200
  .getHostObject<ShadowNodeBinding>(rt);
191
- auto clonedChild = ShadowNodeCopyMachine::copyShadowSubtree(child->sn_);
192
- newChildren->push_back(clonedChild);
193
- child->sn_ = clonedChild;
201
+ newChildren->push_back(child->sn_);
194
202
  child->parent_ = shared_from_this();
195
203
  }
196
204
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leonsilicon/react-native-wishlist",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "The fastest List component for React Native updated to work with Expo 55",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",