Skip to content

Commit b1ffd9e

Browse files
authored
Merge pull request #21 from dohooo/alpha-1.0
v1.0
2 parents 20ff7e1 + 96678e0 commit b1ffd9e

File tree

11 files changed

+436
-485
lines changed

11 files changed

+436
-485
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ English | [简体中文](./README.zh-CN.md)
1616

1717
<br/>
1818

19+
## Here comes the official edition!
20+
`v1` has been born, now the carousel will be more natural, and fixed various bugs in the 0.x version, this library will continue to maintain, rest assured to use! [come and experience](https://snack.expo.dev/@zhaodonghao586/simple-carousel) 🎉🎉🎉
21+
22+
Updates:
23+
- Reconstructed some logic, sliding animation more smooth, natural
24+
- timingConfig -> springConfig (The configuration of the 'duration' property is no longer supported by this configuration)
25+
26+
1927
## Reason
2028

2129
🎉 **Simple、Infinitely scrolling very smooth、Fully implemented using Reanimated 2!**

README.zh-CN.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616

1717
<br/>
1818

19+
## 正式版来了!
20+
`v1`已经诞生,现在轮播图的滚动将会更加自然,并且修复了0.x版本中出现的各种bug,此库将会持续维护,放心使用! [快来体验](https://snack.expo.dev/@zhaodonghao586/simple-carousel) 🎉🎉🎉
21+
22+
更新:
23+
- 重构了部分逻辑,滑动动画更加流畅、自然
24+
- timingConfig -> springConfig (此配置不再支持对`duration`属性的配置)
25+
1926
## 原因
2027

2128
🎉 **易用、无限滚动、完全使用 Reanimated2 实现**

example/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
"test": "jest"
1313
},
1414
"dependencies": {
15-
"expo": "^40.0.0",
16-
"expo-splash-screen": "~0.8.1",
15+
"expo": "^41.0.0",
16+
"expo-splash-screen": "~0.10.2",
1717
"react": "16.13.1",
1818
"react-dom": "16.13.1",
1919
"react-native": "0.63.4",
20-
"react-native-unimodules": "~0.12.0",
21-
"react-native-web": "~0.14.9"
20+
"react-native-unimodules": "~0.13.3",
21+
"react-native-web": "~0.13.12"
2222
},
2323
"devDependencies": {
24-
"@babel/core": "~7.12.10",
24+
"@babel/core": "~7.9.0",
2525
"@babel/runtime": "^7.9.6",
2626
"babel-plugin-module-resolver": "^4.0.0",
2727
"babel-preset-expo": "8.3.0",
2828
"expo-cli": "^4.0.13",
29-
"react-native-gesture-handler": "^1.10.3",
30-
"react-native-reanimated": "2.2.0"
29+
"react-native-gesture-handler": "~1.10.2",
30+
"react-native-reanimated": "~2.1.0"
3131
}
3232
}

example/src/App.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,10 @@ export default function App() {
2525
>
2626
<View style={{ height: 300 }}>
2727
<Carousel<ImageSourcePropType>
28-
autoPlay
29-
timingConfig={{ duration: 500 }}
30-
autoPlayInterval={2000}
3128
ref={r}
3229
width={width}
3330
data={data}
3431
parallaxScrollingScale={0.8}
35-
onSnapToItem={(i) => {
36-
console.log('current index:', i);
37-
}}
3832
renderItem={(source) => (
3933
<View style={{ flex: 1 }}>
4034
<Image
@@ -47,17 +41,11 @@ export default function App() {
4741
</View>
4842
<View style={{ height: 300 }}>
4943
<Carousel<ImageSourcePropType>
50-
autoPlay
51-
timingConfig={{ duration: 500 }}
52-
autoPlayInterval={2000}
5344
ref={r}
5445
mode="parallax"
5546
width={width}
5647
data={data}
5748
parallaxScrollingScale={0.8}
58-
onSnapToItem={(i) => {
59-
console.log('current index:', i);
60-
}}
6149
renderItem={(source) => (
6250
<View style={{ flex: 1 }}>
6351
<Image

example/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
"resolveJsonModule": true,
1313
"esModuleInterop": true,
1414
"moduleResolution": "node"
15-
}
15+
},
16+
"extends": "expo/tsconfig.base"
1617
}

0 commit comments

Comments
 (0)