Skip to content

fix: use direct reanimated type imports instead of namespace access#7331

Merged
janicduplessis merged 1 commit intodevelopfrom
@janic/fix-reanimated-type-imports
Apr 18, 2026
Merged

fix: use direct reanimated type imports instead of namespace access#7331
janicduplessis merged 1 commit intodevelopfrom
@janic/fix-reanimated-type-imports

Conversation

@janicduplessis
Copy link
Copy Markdown
Contributor

@janicduplessis janicduplessis commented Apr 10, 2026

Fixes APP-3616

What changed (plus any additional context for devs)

Extracted from the new arch migration PR #6924.

These namespace exports are deprecated in newer Reanimated versions and will cause TypeScript errors after the upgrade. The direct imports (EasingFunction, AnimatedStyle) are already available in Reanimated 3.19.4 so this can be landed ahead of the full upgrade.

Type-only change, no runtime impact.

What to test

  • TypeScript compiles without errors (yarn lint:ts)

@linear
Copy link
Copy Markdown

linear Bot commented Apr 10, 2026

@janicduplessis janicduplessis enabled auto-merge (squash) April 10, 2026 19:40
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 10, 2026

🧪 Flashlight Performance Report (AWS Device Farm)

🔀 Commit: e9f2c74

📎 View Artifacts

Metric Current Δ vs Baseline
Time to Interactive (TTI) 5601 ms ⚪ -21.5 ms (-0.4%)
Average FPS 56.79 ⚪ +0.1 (+0.1%)
Average RAM 397.1 MB ⚪ -2.1 MB (-0.5%)

@github-actions
Copy link
Copy Markdown

Launch in simulator or device for c2b9bbc

@olerass
Copy link
Copy Markdown
Contributor

olerass commented Apr 15, 2026

Do we wanna fix Animated.SharedValue in src/components/sheet/SlackSheet.tsx too?

@janicduplessis
Copy link
Copy Markdown
Contributor Author

Yes I’ll double check I didn’t miss any

@janicduplessis
Copy link
Copy Markdown
Contributor Author

Fixed in 92e3bbb. Also grepped the tree for other deprecated namespace-type accesses (Animated.SharedValue|DerivedValue|EasingFunction|AnimateStyle|AnimatedStyle|AnimatedRef|…) — SlackSheet.tsx:122 was the only remaining one, everything else in the codebase is either a legit component reference (Animated.View, Animated.ScrollView, etc.) or uses the core RN Animated API.

@github-actions
Copy link
Copy Markdown

Launch in simulator or device for 4bce425

Replace deprecated `Animated.EasingFunction` and `Animated.AnimateStyle`
namespace type access with direct imports (`EasingFunction`, `AnimatedStyle`)
from react-native-reanimated. Prepares for new arch compatibility.
@janicduplessis janicduplessis force-pushed the @janic/fix-reanimated-type-imports branch from 92e3bbb to 5566f33 Compare April 18, 2026 14:44
@github-actions
Copy link
Copy Markdown

Launch in simulator or device for e9f2c74

@janicduplessis janicduplessis merged commit f1a78be into develop Apr 18, 2026
25 of 26 checks passed
@janicduplessis janicduplessis deleted the @janic/fix-reanimated-type-imports branch April 18, 2026 16:55
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