Skip to content

fix: version-gate RawProps::at() for react-native 0.87 signature change#156

Open
cortinico wants to merge 1 commit into
mrousavy:mainfrom
cortinico:nc/rawprops
Open

fix: version-gate RawProps::at() for react-native 0.87 signature change#156
cortinico wants to merge 1 commit into
mrousavy:mainfrom
cortinico:nc/rawprops

Conversation

@cortinico

@cortinico cortinico commented Jun 26, 2026

Copy link
Copy Markdown

react-native 0.87 removed the (name, prefix, suffix) overload of
react::RawProps::at() in favor of a single-argument at(name)
which broke the nightly job for nitro-image.

See:

Older react-native versions (<= 0.86) still
require the 3-argument form, so guard the call behind REACT_NATIVE_VERSION_*
(from <cxxreact/ReactNativeVersion.h>) via a NITRO_RAWPROPS_AT macro:

  • RN > 0.86 (incl. nightly 1000.x): rawProps.at(name)
  • RN <= 0.86: rawProps.at(name, nullptr, nullptr)

This keeps the generated HybridNitroImageViewComponent compiling across
all supported react-native versions.

react-native 0.87 removed the (name, prefix, suffix) overload of
react::RawProps::at() in favor of a single-argument at(name) (D94367880),
which broke the nightly job. Older react-native versions (<= 0.86) still
require the 3-argument form, so guard the call behind REACT_NATIVE_VERSION_*
(from <cxxreact/ReactNativeVersion.h>) via a NITRO_RAWPROPS_AT macro:

  * RN > 0.86 (incl. nightly 1000.x): rawProps.at(name)
  * RN <= 0.86:                       rawProps.at(name, nullptr, nullptr)

This keeps the generated HybridNitroImageViewComponent compiling across
all supported react-native versions.
@cortinico cortinico marked this pull request as ready for review June 26, 2026 12:40
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