Skip to content

Commit 4ed9fc5

Browse files
committed
README updates: fixing typos, beta warning, clarifications and cleanup
1 parent 07990dc commit 4ed9fc5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# React Scroll Parallax
22

3-
Provides a React component and single global passive scroll listener to add **vertical** scroll based offsets to elements based on their position in the viewport. Works with server side rendering and universal react apps.
3+
Provides a React component and single global passive scroll listener to add **vertical** scrolling based offsets to elements based on their position in the viewport. Works with server-side rendering and universal React apps.
44

55
[View on NPM](https://www.npmjs.com/package/react-scroll-parallax)
66

@@ -12,9 +12,9 @@ Provides a React component and single global passive scroll listener to add **ve
1212

1313
## Install
1414

15-
⚠️ **Warning: This is an alpha pre-release**
15+
⚠️ **Warning: This is a beta pre-release**
1616

17-
Please anticipate the possibility of breaking changes in future releases before using this package.
17+
[1.0.0 Release goals](https://github.com/jscottsmith/react-scroll-parallax/issues/3)
1818

1919
```
2020
npm i react-scroll-parallax
@@ -115,7 +115,7 @@ The following are public methods available on the `ParallaxController` global:
115115

116116
**`update()`**
117117

118-
Updates all cached attributes for parallax elements then updates their postitions.
118+
Updates all cached attributes for parallax elements then updates their positions.
119119

120120
**`destroy()`**
121121

@@ -139,10 +139,10 @@ Run Jest tests:
139139

140140
`npm run test`
141141

142-
## Optimizations to reduce Jank and keep scrolling smooth
142+
## Optimizations to Reduce Jank
143143

144144
React Scroll Parallax uses a single [passive scroll listener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners) (dependent on browser support) with the minimal amount of work done on the scroll event to prevent [jank](http://jankfree.org/) (calculations that cause layout, reflow and paint are cached initially and only updated when layout changes). Request animation frame is then used to decouple the scroll handler and further reduce jank. All offsets are applied with 3D transforms to utilize the GPU and prevent paints. If you have ideas to further optimize scrolling please PR or post an issue.
145145

146146
**PSA**
147147

148-
It's 2017 and you probably shouldn't be building parallax sites—but if you do (like I did) and you use this package try and use it responsibly. Keep images small and optimized. Reduce the number of moving elements in view and on the page. Disable scroll effects on mobile devices. Just keep things performant and animation silky smooth.
148+
It's 2017 and you probably shouldn't be building parallax sites—but if you do (like I did) and you use this package try and use it responsibly. Keeping images small and optimized, reducing the number of moving elements in view and on the page, and disabling scroll effects on mobile devices should help achieve silky smooth animations and minimize annoying visitors.

0 commit comments

Comments
 (0)