Skip to content

Commit d9864e5

Browse files
author
Rodrigo Cervantes Saucedo
committed
updated changedlog and readme
1 parent 2d1b2ad commit d9864e5

File tree

3 files changed

+67
-30
lines changed

3 files changed

+67
-30
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog
22

3+
### 0.20.0 // Rodrigocs
4+
- Now uses native driver, and tested with React Native 0.46.0
5+
- Adds `useNativeDriver` to improve performance, but renderScrollComponent must be a Animated component ( ie: Animated.createAnimatedComponent(component))
6+
37
### 0.19.0
48

59
- Fixes compatibility with React Native 0.27.2
@@ -9,7 +13,7 @@
913

1014
- Fixes error when inspecting the sticky header due to cyclical object structure
1115
on `style` (#23)
12-
16+
1317
### 0.18.0 (Compatibility with React Native 0.20.0)
1418

1519
- **Breaking:** Removes `ParallaxScrollView#scrollWithoutAnimationTo` since this has been deprecated in React Native. If you used this method previously, use `scrollTo` instead.

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
[![](https://img.shields.io/npm/dm/react-native-parallax-scroll-view.svg?style=flat-square)](https://www.npmjs.com/package/react-native-parallax-scroll-view)
22

3+
# Rodrigocs - Animated Driver
4+
5+
This component now uses Native Driver by default.
6+
Remember to pass a Animated component to `renderScrollComponent`, by default it has `Animated.ScrollView`
7+
8+
# Example
9+
```js
10+
import ParallaxScrollView from 'react-native-parallax-scroll-view';
11+
import CustomScrollView from 'custom-scroll-view'
12+
13+
const AnimatedCustomScrollView = Animated.createAnimatedComponent(CustomScrollView)
14+
15+
render() {
16+
return (
17+
<ParallaxScrollView
18+
backgroundColor="blue"
19+
contentBackgroundColor="pink"
20+
parallaxHeaderHeight={300}
21+
// renderScrollComponent={() => <Animated.View />}
22+
renderScrollComponent={() => <AnimatedCustomScrollView />}
23+
renderForeground={() => (
24+
<View style={{ height: 300, flex: 1, alignItems: 'center', justifyContent: 'center' }}>
25+
<Text>Hello World!</Text>
26+
</View>
27+
)}>
28+
<View style={{ height: 500 }}>
29+
<Text>Scroll me</Text>
30+
</View>
31+
</ParallaxScrollView>
32+
);
33+
}
34+
```
35+
336
# react-native-parallax-scroll-view
437

538
A `ScrollView`-like component that:
@@ -99,7 +132,7 @@ The `ParallaxScrollView` component adds a few additional properties, as describe
99132
- **Breaking:** Removes `ParallaxScrollView#scrollWithoutAnimationTo` since this has been deprecated in React Native. If you used this method previously, use `scrollTo` instead.
100133
- Adds `ParallaxScrollView#getScrollableNode` method, which is required in React Native 0.20.0 for components implementing
101134
`ScrollView` interface.
102-
135+
103136
See full changelog [here](./CHANGELOG.md).
104137

105138
## Contributing

package.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
2-
"name": "react-native-parallax-scroll-view",
3-
"version": "0.19.0",
4-
"description": "A ScrollView-like component with parallax and sticky header support",
5-
"main": "src/index.js",
6-
"repository": {
7-
"type": "git",
8-
"url": "https://github.com/jaysoo/react-native-parallax-scroll-view"
9-
},
10-
"files": [
11-
"src",
12-
"demo.ios.gif",
13-
"demo.android.20160117.gif",
14-
"README.md",
15-
"LICENSE"
16-
],
17-
"keywords": [
18-
"react-native",
19-
"react",
20-
"parallax",
21-
"scrollable",
22-
"scrollview",
23-
"sticky",
24-
"react-component",
25-
"ios",
26-
"android"
27-
],
28-
"author": "Jack Hsu",
29-
"license": "ISC"
2+
"name": "react-native-parallax-scroll-view",
3+
"version": "0.20.0",
4+
"description": "A ScrollView-like component with parallax and sticky header support",
5+
"main": "src/index.js",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/jaysoo/react-native-parallax-scroll-view"
9+
},
10+
"files": [
11+
"src",
12+
"demo.ios.gif",
13+
"demo.android.20160117.gif",
14+
"README.md",
15+
"LICENSE"
16+
],
17+
"keywords": [
18+
"react-native",
19+
"react",
20+
"parallax",
21+
"scrollable",
22+
"scrollview",
23+
"sticky",
24+
"react-component",
25+
"ios",
26+
"android"
27+
],
28+
"author": "Jack Hsu",
29+
"license": "ISC"
3030
}

0 commit comments

Comments
 (0)