yarn react-native-reanimated-carousel 5.0.0-beta.2
v5.0.0-beta.2

10 hours ago

Minor Changes

  • #873 ffb59aa Thanks @dohooo! - # Deprecate width/height props in favor of style-based sizing

    Changes

    Deprecated Props

    • width and height props are now deprecated. Use style={{ width: ..., height: ... }} instead
    • defaultScrollOffsetValue is deprecated in favor of scrollOffsetValue

    New Behavior

    • Carousel now prioritizes dimensions from style prop over legacy width/height props
    • When both style and legacy props are provided, style takes precedence

    Migration

    Before (v4 style):

    <Carousel width={300} height={200} />

    After (v5 style):

    <Carousel style={{ width: 300, height: 200 }} />

    Scroll offset:

    // Before
    <Carousel defaultScrollOffsetValue={sharedValue} />
    
    // After
    <Carousel scrollOffsetValue={sharedValue} />

    Notes

    • Legacy props remain functional for backwards compatibility
    • Console warnings will guide migration in development mode
    • Full removal planned for next major version

Don't miss a new react-native-reanimated-carousel release

NewReleases is sending notifications on new releases.