Skip to content

Carousel examples allocate new Animated.Values on every render #1119

Description

@OskarEichler

HeadphonesCarouselExample and PaginationDotsExample both eagerly construct Animated.Value arguments to useRef. A real React renderer update doubles their allocation count from two to four although references do not change. Proposed fix: lazy state initialization for these animation resources, plus lazy mount-only page/route initialization in the two other example components with the same eager initializer pattern. No animation-driver or layout changes are proposed. This source audit is AI-assisted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions