Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"fix-nonloop-overscroll",
"fix-pagination-accessibility",
"honest-baboons-sip",
"odd-news-carry"
"odd-news-carry",
"style-based-sizing"
]
}
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,53 @@
# react-native-reanimated-carousel

## 5.0.0-beta.2

### Minor Changes

- [#873](https://github.com/dohooo/react-native-reanimated-carousel/pull/873) [`ffb59aa`](https://github.com/dohooo/react-native-reanimated-carousel/commit/ffb59aac4154350d67ccfea55cb86e8be24c6b08) Thanks [@dohooo](https://github.com/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):**

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

**After (v5 style):**

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

**Scroll offset:**

```tsx
// 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

## 5.0.0-beta.1

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-reanimated-carousel",
"version": "5.0.0-beta.1",
"version": "5.0.0-beta.2",
"packageManager": "[email protected]",
"description": "Simple carousel component.fully implemented using Reanimated 2.Infinitely scrolling, very smooth.",
"author": "Doho <[email protected]> (https://github.com/dohooo)",
Expand Down