Skip to content

Commit 8da1e93

Browse files
release: version packages (beta) (#874)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent ffb59aa commit 8da1e93

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

.changeset/pre.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"fix-nonloop-overscroll",
1111
"fix-pagination-accessibility",
1212
"honest-baboons-sip",
13-
"odd-news-carry"
13+
"odd-news-carry",
14+
"style-based-sizing"
1415
]
1516
}

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# react-native-reanimated-carousel
22

3+
## 5.0.0-beta.2
4+
5+
### Minor Changes
6+
7+
- [#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
8+
9+
## Changes
10+
11+
### Deprecated Props
12+
13+
- `width` and `height` props are now deprecated. Use `style={{ width: ..., height: ... }}` instead
14+
- `defaultScrollOffsetValue` is deprecated in favor of `scrollOffsetValue`
15+
16+
### New Behavior
17+
18+
- Carousel now prioritizes dimensions from `style` prop over legacy `width`/`height` props
19+
- When both `style` and legacy props are provided, `style` takes precedence
20+
21+
### Migration
22+
23+
**Before (v4 style):**
24+
25+
```tsx
26+
<Carousel width={300} height={200} />
27+
```
28+
29+
**After (v5 style):**
30+
31+
```tsx
32+
<Carousel style={{ width: 300, height: 200 }} />
33+
```
34+
35+
**Scroll offset:**
36+
37+
```tsx
38+
// Before
39+
<Carousel defaultScrollOffsetValue={sharedValue} />
40+
41+
// After
42+
<Carousel scrollOffsetValue={sharedValue} />
43+
```
44+
45+
### Notes
46+
47+
- Legacy props remain functional for backwards compatibility
48+
- Console warnings will guide migration in development mode
49+
- Full removal planned for next major version
50+
351
## 5.0.0-beta.1
452

553
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-reanimated-carousel",
3-
"version": "5.0.0-beta.1",
3+
"version": "5.0.0-beta.2",
44
"packageManager": "yarn@4.0.2",
55
"description": "Simple carousel component.fully implemented using Reanimated 2.Infinitely scrolling, very smooth.",
66
"author": "Doho <zhaodonghao586@outlook.com> (https://github.com/dohooo)",

0 commit comments

Comments
 (0)