Skip to content

pkg: Update React Native to 0.87 (InteractionManager → requestIdleCallback) - #4186

Open
ntucker wants to merge 3 commits into
masterfrom
cursor/non-major-deps-rn-087-99d9
Open

ntucker wants to merge 3 commits into
masterfrom
cursor/non-major-deps-rn-087-99d9

Conversation

@ntucker

@ntucker ntucker commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Replaces the React Native part of Renovate's #4059: react-native and @react-native/jest-preset 0.86.2 → 0.87.1. The other non-major updates from #4059 landed in #4187.

Motivation

React Native 0.87 removed InteractionManager from core. It is no longer in the types, and reading it throws in DEV: "InteractionManager has been removed from react-native core. Please refactor long tasks into smaller ones, and use 'requestIdleCallback' instead." That made tsc --build fail in CircleCI setup, the website typecheck job, and the Vercel build on #4059. It would also break @data-client/react for apps on React Native 0.87.

Solution

Dependencies

  • react-native 0.87.1 in the root, packages/react and packages/test; @react-native/jest-preset 0.87.1 in the root.
  • yarn.lock regenerated with yarn against current master. The diff is limited to React Native's transitive dependencies (metro, hermes, @react-native/*, flow-parser), plus a dedupe of flow-parser only.
  • No CircleCI image change. React Native 0.87's Node engine range accepts the current CircleCI image.

InteractionManager → requestIdleCallback (@data-client/react, native only)

  • Removed GCPolicy.native.ts and IdlingNetworkManager.native.ts. React Native now uses the shared implementations, which already call requestIdleCallback(cb, { timeout }) (GC sweep timeout 1000ms, idle fetch timeout 500ms). This replaces runAfterInteractions plus setDeadline. React Native has provided global requestIdleCallback in both legacy and bridgeless architectures for many versions, so the minimum supported React Native version does not change.
  • Native useSuspense, useFetch and useDLE schedule their refetch-on-focus through a new runWhenIdle() helper that can be cancelled (requestIdleCallback/cancelIdleCallback). It has no timeout, matching the previous "run after interactions" intent. It falls back to setTimeout(0) because the @react-native/jest-preset test environment is plain Node and has no requestIdleCallback.
  • Tests: removed the InteractionManager usages, rewrote RIC.native.ts to cover both paths (requestIdleCallback present and absent), and added runWhenIdle.native.ts tests for scheduling and cancellation.
  • Changeset (patch, @data-client/react), plus a getDefaultManagers doc line and the regenerated skill references.

Jest preset 0.87

  • @react-native/jest-preset 0.87 setup mocks react-native/setup-env. Our ReactNative jest project mirrors the preset's moduleNameMapper, so jest.config.js gets the same alias.

Verification (local, rebased on master after #4187)

  • yarn install --immutable: passes. Regenerating from master's yarn.lock produces an identical file.
  • yarn ci:build:types: passes
  • yarn workspace rdc-website typecheck: passes
  • yarn lint --quiet packages/*/src: clean
  • yarn test:ci (ReactDOM, Node and ReactNative): 127 suites, 1755 passed
  • yarn jest --selectProjects ReactNative with type-checking on: 9 suites, 65 passed
Open in Web Open in Cursor 

@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs-site Ready Ready Preview Oct 5, 2026 9:04pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aef625d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@data-client/react Patch
example-benchmark-react Patch
test-bundlesize Patch
coinbase-lite Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 103 kB

ℹ️ View Unchanged
Filename Size
examples/test-bundlesize/dist/App.js 1.46 kB
examples/test-bundlesize/dist/polyfill.js 307 B
examples/test-bundlesize/dist/rdcClient.js 10.9 kB
examples/test-bundlesize/dist/rdcEndpoint.js 8.07 kB
examples/test-bundlesize/dist/rdcNextjs.js 12.3 kB
examples/test-bundlesize/dist/rdcPipeableStream.js 9.64 kB
examples/test-bundlesize/dist/react.js 59.7 kB
examples/test-bundlesize/dist/webpack-runtime.js 784 B

compressed-size-action

@github-actions github-actions Bot 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.

Benchmark React

Details
Benchmark suite Current: 179cea4 Previous: 159c963 Ratio
data-client: getlist-100 142.86 ops/s (± 4.4%) 137.94 ops/s (± 3.3%) 0.97
data-client: getlist-500 44.05 ops/s (± 4.5%) 44.55 ops/s (± 3.6%) 1.01
data-client: update-entity 416.67 ops/s (± 7.9%) 370.37 ops/s (± 9.8%) 0.89
data-client: update-user 400 ops/s (± 8.2%) 344.83 ops/s (± 8.4%) 0.86
data-client: getlist-500-sorted 46.74 ops/s (± 8.7%) 43.01 ops/s (± 8.8%) 0.92
data-client: update-entity-sorted 357.14 ops/s (± 9.3%) 298.57 ops/s (± 5.5%) 0.84
data-client: update-entity-multi-view 370.37 ops/s (± 7.1%) 317.54 ops/s (± 5.3%) 0.86
data-client: list-detail-switch-10 9.23 ops/s (± 12.6%) 9.29 ops/s (± 11.5%) 1.01
data-client: update-user-10000 78.13 ops/s (± 4.4%) 79.06 ops/s (± 15.4%) 1.01
data-client: invalidate-and-resolve 38.32 ops/s (± 5.4%) 37.31 ops/s (± 5.8%) 0.97
data-client: unshift-item 232.56 ops/s (± 6.4%) 217.39 ops/s (± 5.9%) 0.93
data-client: delete-item 298.57 ops/s (± 3.5%) 277.78 ops/s (± 4.0%) 0.93
data-client: move-item 180.19 ops/s (± 9.2%) 170.95 ops/s (± 7.6%) 0.95

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.10%. Comparing base (7954e6b) to head (aef625d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4186   +/-   ##
=======================================
  Coverage   98.10%   98.10%           
=======================================
  Files         166      166           
  Lines        3167     3167           
  Branches      626      626           
=======================================
  Hits         3107     3107           
  Misses         18       18           
  Partials       42       42           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot 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.

Benchmark

Details
Benchmark suite Current: c656274 Previous: 159c963 Ratio
normalizeLong 728 ops/sec (±6.12%) 699 ops/sec (±4.64%) 0.96
normalizeLong Values 625 ops/sec (±0.90%) 505 ops/sec (±11.24%) 0.81
normalizeLong Scalar 559 ops/sec (±2.27%) 549 ops/sec (±3.58%) 0.98
normalizeLong Scalar update 1594 ops/sec (±0.35%) 1590 ops/sec (±1.27%) 1.00
denormalizeLong 310 ops/sec (±4.79%) 318 ops/sec (±6.29%) 1.03
denormalizeLong Values 299 ops/sec (±4.04%) 308 ops/sec (±4.18%) 1.03
denormalizeLong donotcache 1875 ops/sec (±0.76%) 1856 ops/sec (±1.85%) 0.99
denormalizeLong Values donotcache 1267 ops/sec (±2.43%) 1274 ops/sec (±0.51%) 1.01
denormalizeLong Scalar donotcache 1972 ops/sec (±0.48%) 1849 ops/sec (±1.03%) 0.94
denormalizeShort donotcache 500x 2321 ops/sec (±4.86%) 2347 ops/sec (±1.71%) 1.01
denormalizeShort 500x 899 ops/sec (±6.20%) 892 ops/sec (±6.30%) 0.99
denormalizeShort 500x withCache 8880 ops/sec (±0.73%) 9067 ops/sec (±2.64%) 1.02
queryShort 500x withCache 5314 ops/sec (±2.51%) 5230 ops/sec (±2.32%) 0.98
buildQueryKey All 89321 ops/sec (±2.41%) 95536 ops/sec (±0.84%) 1.07
query All withCache 10252 ops/sec (±5.56%) 10248 ops/sec (±6.04%) 1.00
denormalizeLong with mixin Entity 289 ops/sec (±6.43%) 326 ops/sec (±6.20%) 1.13
denormalizeLong withCache 13337 ops/sec (±2.02%) 13378 ops/sec (±0.31%) 1.00
denormalizeLong withCache (Scalar churn) 13138 ops/sec (±1.42%) 13539 ops/sec (±0.82%) 1.03
denormalizeLong Values withCache 10303 ops/sec (±1.93%) 10180 ops/sec (±1.68%) 0.99
denormalizeLong Scalar withCache 14306 ops/sec (±1.10%) 14448 ops/sec (±0.54%) 1.01
denormalizeLong Scalar update withCache 7948 ops/sec (±1.36%) 7728 ops/sec (±1.11%) 0.97
denormalizeLong All withCache 13337 ops/sec (±0.57%) 13098 ops/sec (±2.34%) 0.98
denormalizeLong Query-sorted withCache 11258 ops/sec (±4.84%) 10624 ops/sec (±6.24%) 0.94
denormalizeLongAndShort withEntityCacheOnly 2913 ops/sec (±0.62%) 3096 ops/sec (±0.54%) 1.06
denormalize bidirectional 50 6592 ops/sec (±11.61%) 7071 ops/sec (±9.67%) 1.07
denormalize bidirectional 50 donotcache 74669 ops/sec (±3.11%) 73540 ops/sec (±2.08%) 0.98
getResponse 7420 ops/sec (±5.80%) 7112 ops/sec (±6.65%) 0.96
getResponse (null) 19682865 ops/sec (±1.99%) 19058611 ops/sec (±2.26%) 0.97
getResponse (clear cache) 283 ops/sec (±8.73%) 317 ops/sec (±7.18%) 1.12
getSmallResponse 6091 ops/sec (±2.11%) 6114 ops/sec (±0.74%) 1.00
getSmallInferredResponse 4892 ops/sec (±3.16%) 4837 ops/sec (±1.75%) 0.99
getResponse Collection 8965 ops/sec (±2.32%) 8876 ops/sec (±0.95%) 0.99
get Collection 5847 ops/sec (±0.53%) 6818 ops/sec (±1.46%) 1.17
get Query-sorted 8755 ops/sec (±3.57%) 8408 ops/sec (±4.69%) 0.96
setLong 772 ops/sec (±0.54%) 795 ops/sec (±0.90%) 1.03
setLongWithMerge 427 ops/sec (±2.21%) 433 ops/sec (±1.56%) 1.01
setLongWithSimpleMerge 467 ops/sec (±0.55%) 470 ops/sec (±0.55%) 1.01
setSmallResponse 500x 1602 ops/sec (±1.38%) 1605 ops/sec (±2.35%) 1.00
setMany 50x one-per-row 213 ops/sec (±1.58%) 219 ops/sec (±1.17%) 1.03
setMany 50 batch 6114 ops/sec (±0.52%) 6258 ops/sec (±0.60%) 1.02
setMany 500x one-per-row 22.02 ops/sec (±0.50%) 21.84 ops/sec (±3.40%) 0.99
setMany 500 batch 2797 ops/sec (±0.43%) 2824 ops/sec (±0.72%) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@ntucker
ntucker marked this pull request as ready for review October 5, 2026 16:40

ntucker commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Grok Bot — upcoming cloud agent push on this branch (cursor/non-major-deps-rn-087-99d9):

  1. Keep focus revalidation unbounded (requestIdleCallback with no timeout) to match prior InteractionManager.runAfterInteractions behavior.
  2. Split this PR: leave only React Native 0.87 + the InteractionManager→requestIdleCallback / jest-preset work here; move all other non-major package upgrades to a separate PR from master.

Claude Code: heads-up that this branch will get force-pushed/rewritten for that split.

@cursor
cursor Bot force-pushed the cursor/non-major-deps-rn-087-99d9 branch from c656274 to 179cea4 Compare October 5, 2026 17:02
@cursor cursor Bot changed the title pkg: Update non-major dependencies including React Native 0.87 pkg: Update React Native to 0.87 (InteractionManager → requestIdleCallback) Oct 5, 2026

ntucker commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Grok Bot — upcoming cloud agent push on this branch (cursor/non-major-deps-rn-087-99d9):

Rebase onto current master (needed after #4187 merged and both touched yarn.lock), regenerate yarn.lock with yarn install keeping only the React Native–related lockfile changes, then push and re-verify types/tests.

Claude Code: heads-up that this branch will be force-pushed for the rebase.

cursoragent and others added 3 commits October 5, 2026 20:59
Co-authored-by: Nathaniel Tucker <me@ntucker.me>
The 0.87 jest setup mocks react-native/setup-env; our ReactNative
project mirrors the preset's moduleNameMapper so it needs the same alias.

Co-authored-by: Nathaniel Tucker <me@ntucker.me>
…React Native

React Native 0.87 removed InteractionManager (accessing it throws in DEV).
Native GCPolicy and IdlingNetworkManager now share the web implementations,
which already schedule via requestIdleCallback with a timeout. Focus
revalidation in native useSuspense/useFetch/useDLE uses a cancellable
runWhenIdle helper.

Co-authored-by: Nathaniel Tucker <me@ntucker.me>

This branch was successfully deployed

1 active deployment
Preview — aef625d3 Deployed Oct 5, 2026 by vercel[bot]
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.

2 participants