Skip to content

Strict API: fix Animated style assignability #101817

Closed

Description

@roryabraham

Part of #101439.

Do not enable customConditions here. Land this after the ThemeStyles fix — most of the style errors in the opt-in log were that cascade, and the real remainder is the Animated.* call sites below.

Incompatibility

Animated nodes are no longer generic, so Animated.Value<number> style type arguments are rejected. transform is an array of {scale} / {rotate} objects, not a raw string.

getDirectionStyle in src/styles/utils/index.ts returns {transform: 'rotate(180deg)'}, which will not assign to ViewStyle. Animated.View and Animated.ScrollView call sites that pass those styles fail the same way. transformOrigin typed as a bare number has the same problem — the Strict API wants string | [x, y, z].

Fix

  • getDirectionStyle should return transform: [{rotate: '180deg'}].
  • Drop type parameters from Animated.Value, Animated.ValueXY, and the other animated node types.
  • Fix the Animated.View / Animated.ScrollView call sites directory by directory (src/styles/utils, then src/components/Animated*, then the rest) if one PR gets too big. Each directory should still be one PR.

Animated.LegacyRef is covered by the ref PR, not this one.

Activity

  1. self-assigned this
    on Sep 21, 2026
  2. roryabraham commented on Sep 22, 2026

    @roryabraham
    ContributorAuthor

    merged, awaiting deploy before closing. No payments due

  3. melvin-bot commented on Sep 24, 2026

    @melvin-bot

    @roryabraham

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.92-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions