Skip to content

fix: bump nitro to 0.36.5 so the library works on React Native 0.87 - #380

Merged
mfazekas merged 1 commit into
mainfrom
claude/github-issue-378-42852e
Sep 10, 2026
Merged

fix: bump nitro to 0.36.5 so the library works on React Native 0.87#380
mfazekas merged 1 commit into
mainfrom
claude/github-issue-378-42852e

Conversation

@mfazekas

@mfazekas mfazekas commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Fixes #378.

React Native 0.87 only calls the two-argument installJSIBindingsWithRuntime:callInvoker: TurboModule hook, which nitro added in 0.36.2. With the previous <0.36 peer range no Nitro module could install and the app never registered. Reproduced in a bare RN 0.87.0 app with the published 0.5.0-beta.3: native build succeeds, blank screen, Failed to install Nitro: installJSIBindingsWithRuntime: was not called in the log.

This moves nitrogen and react-native-nitro-modules to 0.36.5, regenerates the specs and widens the peer range to >=0.35.10 <0.37. The floor is unchanged because the regenerated specs still build and run against nitro 0.35.10 (verified on both platforms plus three harness suites), so existing consumers are not forced to bump; RN 0.87 users need 0.36.2 or newer, which the README now says. The cap stays below 0.37 on purpose: nitro 0.37 moves prop parsing into its core, where clearing an optional prop still throws (margelo/nitro#1515 is unmerged), and our existing null-prop shim only anchors on the 0.36 generated code.

nitrogen 0.36 changes two things the generated view code relies on. Both are handled in scripts/nitrogen-postprocess.ts, the same way nitro 0.37 fixes them upstream:

  1. The component descriptor is built with a plain RawPropsParser(), which only keeps props as jsi::Values on RN >= 0.85. Older versions convert every prop to folly::dynamic and the generated Props constructor aborts on the first RiveView mount. The postprocess forces the JSI parser where the flag still exists.
  2. The component view never sets _props, which RN 0.87 turns into a fatal RCTViewComponentView assertion on debug builds. The postprocess initializes it to the component's default props in init.

The EventPropertiesOutput variant is now ordered boolean | number | string, so the hand-written Swift and Kotlin helpers swap their cases.

Verified: example iOS (RN 0.80.3) harness 28 suites / 208 tests, Android harness 28 suites / 208 tests, and a bare RN 0.87.0 app with the packed tarball + nitro 0.36.5 installs Nitro and renders rewards.riv. The same bump should be backported to release-v0.4 so npm latest works on RN 0.87 too.

@mfazekas
mfazekas force-pushed the claude/github-issue-378-42852e branch 2 times, most recently from a830556 to 8f027c0 Compare September 9, 2026 12:22
React Native 0.87 only calls the two-argument
installJSIBindingsWithRuntime:callInvoker: TurboModule hook, which nitro added
in 0.36.2, so with the previous <0.36 peer range no Nitro module could install
and the app never registered. Move nitrogen and react-native-nitro-modules to
0.36.5, regenerate the specs and widen the peer range to >=0.35.10 <0.37. The
regenerated specs still build and run against nitro 0.35.10, so the floor is
unchanged; RN 0.87 users pick 0.36.2 or newer, as the README now says.

nitrogen 0.36 changes two things the generated view code relies on, both
handled in the postprocess script (nitro 0.37 fixes both upstream):

- the component descriptor is built with a plain RawPropsParser(), which
  only keeps props as jsi::Values on RN >= 0.85; older versions convert
  every prop to folly::dynamic and the generated Props constructor aborts on
  the first RiveView mount. Force the JSI parser where the flag still exists.
- the component view never sets _props, which RN 0.87 turns into a fatal
  RCTViewComponentView assertion on debug builds. Initialize it to the
  component's default props in init.

The EventPropertiesOutput variant is now ordered boolean | number | string,
so the hand-written Swift and Kotlin helpers swap their cases.

Fixes #378
@mfazekas
mfazekas force-pushed the claude/github-issue-378-42852e branch from 8f027c0 to bee28c1 Compare September 9, 2026 13:23

@HayesGordon HayesGordon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mfazekas
mfazekas merged commit 2951455 into main Sep 10, 2026
15 checks passed
@mfazekas
mfazekas deleted the claude/github-issue-378-42852e branch September 10, 2026 07:07
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.

RN 0.87 incompatible: nitro peer capped at <0.36, but the installJSIBindingsWithRuntime:callInvoker: fix ships in nitro 0.36.2+

2 participants