Created
February 26, 2025 12:04
-
-
Save okwasniewski/ce4c4ef2857673fc7bd13a892c06158a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps | |
{ | |
const auto &oldViewProps = *std::static_pointer_cast<SwiftUIStoreViewViewProps const>(_props); | |
const auto &newViewProps = *std::static_pointer_cast<SwiftUIStoreViewViewProps const>(props); | |
if (oldViewProps.productIDs != newViewProps.productIDs) { | |
NSMutableArray *productIds = [[NSMutableArray alloc] initWithCapacity:newViewProps.productIDs.size()]; | |
for (auto &productId : newViewProps.productIDs) { | |
[productIds addObject:[NSString stringWithUTF8String:productId.c_str()]]; | |
} | |
_view.productIDs = productIds; | |
} | |
[super updateProps:props oldProps:oldProps]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment