From b2ff0fa49143f5912e5071888fcc4276e1acfbc9 Mon Sep 17 00:00:00 2001 From: SzymczakJ Date: Mon, 1 Jun 2026 09:32:56 +0200 Subject: [PATCH] fix: disable component recycling for RNLinearGradient Override +shouldBeRecycled to return NO so Fabric does not recycle RNLinearGradient view instances, avoiding stale gradient state when views are reused. Co-Authored-By: Claude Opus 4.8 (1M context) --- ios/RNLinearGradient.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ios/RNLinearGradient.mm b/ios/RNLinearGradient.mm index c181bd4..42396f6 100644 --- a/ios/RNLinearGradient.mm +++ b/ios/RNLinearGradient.mm @@ -139,6 +139,11 @@ + (ComponentDescriptorProvider)componentDescriptorProvider return concreteComponentDescriptorProvider(); } ++ (BOOL)shouldBeRecycled +{ + return NO; +} + - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) {