# react-compiler-reanimated-shared-values

react-compiler-reanimated-shared-values is a Claude Code rule for handling Reanimated shared values with React Compiler enabled. It directs code to use .get() and .set() rather than .value.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 88 repo stars
- Author: alexj11324
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/alexj11324/Mikka/tree/HEAD/.claude/skills/react-native-skills/rules/react-compiler-reanimated-shared-values.md
- Updated: 2026-11-17
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/react-compiler-reanimated-shared-values

## What it does

The rule requires `.get()` to read a Reanimated shared value and `.set()` to update it when React Compiler is enabled. A counter can update with `count.set(count.get() + 1)` and render its value with `count.get()`.

React Compiler cannot track direct `.value` property access, so the rule avoids that pattern. To install it in Claude Code, place the file at `.claude/rules/react-compiler-reanimated-shared-values.md`.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/react-compiler-reanimated-shared-values.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/react-compiler-reanimated-shared-values.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/react-compiler-reanimated-shared-values.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/react-compiler-reanimated-shared-values.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/react-compiler-reanimated-shared-values.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/alexj11324/Mikka/tree/HEAD/.claude/skills/react-native-skills/rules/react-compiler-reanimated-shared-values.md

## When to use it
- replace direct `.value` reads with `.get()`
- update Reanimated shared values through `.set()`
- use Reanimated shared values with React Compiler enabled

## Example prompts
- Use `.get()` and `.set()` for Reanimated shared values in this component.
- Update the `count` example to use Reanimated methods with React Compiler.

## Similar
- [reanimated-skia-performance](https://affpapa.org/en/nevibecode/skills/reanimated-skia-performance.md) — skill · 988 installs
- [creating-reanimated-animations](https://affpapa.org/en/nevibecode/skills/creating-reanimated-animations.md) — skill · 879 installs
- [rerender-use-ref-transient-values](https://affpapa.org/en/nevibecode/rules/rerender-use-ref-transient-values.md) — rule · ★ 7191 repo stars
- [vercel-react-native-skills](https://affpapa.org/en/nevibecode/skills/vercel-react-native-skills.md) — skill · 283800 installs
- [company-values](https://affpapa.org/en/nevibecode/skills/company-values.md) — skill · 2600 installs
- [argent-react-native-optimization](https://affpapa.org/en/nevibecode/skills/argent-react-native-optimization.md) — skill · 32700 installs

From the same set: [alexj11324/mikka](https://affpapa.org/en/nevibecode/by/alexj11324/mikka.md) — 47 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
