Skip to content

fix: Fix [super invalidate] being broken in react-native 0.82 or below#1267

Merged
mrousavy merged 1 commit intomainfrom
fix/fix-onviewdropped-below-rn-82
Mar 15, 2026
Merged

fix: Fix [super invalidate] being broken in react-native 0.82 or below#1267
mrousavy merged 1 commit intomainfrom
fix/fix-onviewdropped-below-rn-82

Conversation

@mrousavy
Copy link
Copy Markdown
Owner

@mrousavy mrousavy commented Mar 15, 2026

Fabrizio reported a build error with our recent change in #1266:

❌  (modules/mapbox-navigation/nitrogen/generated/ios/c++/views/HybridMapboxNavigationComponent.mm:110:10)

  108 |   MapboxNavigation::HybridMapboxNavigationSpec_cxx& swiftPart = _hybridView->getSwiftPart();
  109 |   swiftPart.onDropView();
> 110 |   [super invalidate];
      |          ^ no visible @interface for 'RCTViewComponentView' declares the selector 'invalidate'
  111 | }
  112 |
  113 | @end

This happened when building a spec generated with Nitro 0.35.1 (which includes #1266) in a app with react-native 0.81 or below.

invalidate was only introduced in react-native 0.82.

So the fix is to #ifdef guard it behind a feature flag which is only true on RN 0.82+.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nitro-docs Skipped Skipped Mar 15, 2026 7:48pm

Request Review

@mrousavy mrousavy merged commit 7e553ec into main Mar 15, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant