Skip to content

chore: support React Compiler-safe shared value access#162

Merged
saseungmin merged 1 commit into
mainfrom
chore/react-compiler-shared-values
May 2, 2026
Merged

chore: support React Compiler-safe shared value access#162
saseungmin merged 1 commit into
mainfrom
chore/react-compiler-shared-values

Conversation

@saseungmin
Copy link
Copy Markdown
Owner

@saseungmin saseungmin commented May 2, 2026

Align internal Reanimated shared value access with React Compiler guidance by using get() and set() instead of direct .value reads and writes. Public APIs are unchanged.

Summary by CodeRabbit

  • Chore
    • Updated internal state management patterns to align with React Compiler guidance, improving long-term compatibility and maintainability.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 2, 2026

🦋 Changeset detected

Latest commit: 391c0e1

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

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e814503d-4722-45e4-908b-e5b5194da8b3

📥 Commits

Reviewing files that changed from the base of the PR and between 6983401 and 391c0e1.

📒 Files selected for processing (4)
  • .changeset/petite-geckos-carry.md
  • src/GestureViewerManager.ts
  • src/useGestureViewer.ts
  • src/utils/tapZoom.ts

📝 Walkthrough

Walkthrough

The PR migrates React Native Reanimated shared-value access throughout the codebase from direct .value reads/writes to the .get()/.set() API in gesture manager, hook animations, gesture handlers, and utility functions, aligning with React Compiler guidance.

Changes

Reanimated Shared Value API Migration

Layer / File(s) Summary
Core Manager Methods
src/GestureViewerManager.ts
rotate, zoomIn, zoomOut, and resetZoom methods switch from .value property access to .get()/.set() calls for reading and updating shared scale, translation, and rotation values.
Hook & Gesture Integration
src/useGestureViewer.ts
useAnimatedReaction selectors, transform reset logic, trigger animations, pinch/pan gesture handlers, and animatedStyle/backdropStyle derivations all migrate to .get()/.set() API for all shared value interactions.
Utility Functions
src/utils/tapZoom.ts
applyTapZoomAtPoint function switches from .value reads to .get() and updates scale/translation via .set(withTiming(...)) instead of direct assignment.
Changelog
.changeset/petite-geckos-carry.md
Patch release notes document the internal Reanimated API migration while confirming public APIs remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Hop, hop, the values flow,
From .value whispers, now we know,
.get() and .set() lead the way,
React Compiler smiles today!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore: support React Compiler-safe shared value access' accurately describes the main change: migrating internal Reanimated shared value access from .value to .get()/.set() for React Compiler compatibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/react-compiler-shared-values

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@saseungmin saseungmin merged commit b6ed63a into main May 2, 2026
5 checks passed
@saseungmin saseungmin deleted the chore/react-compiler-shared-values branch May 2, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant