mohebifar / mohebifar/react-native-loader
DoubleBounce animation lag
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 392
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-loader@1.3.1 for the project I'm working on.
I have problem with DoubleBounce animation. It starts after 1 second after render and its looks weird.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-loader/src/DoubleBounce.js b/node_modules/react-native-loader/src/DoubleBounce.js
index 5cf93c1..4c324c4 100644
--- a/node_modules/react-native-loader/src/DoubleBounce.js
+++ b/node_modules/react-native-loader/src/DoubleBounce.js
@@ -25,7 +25,7 @@ export default class Pulse extends Component {
componentDidMount() {
this.animate(0);
- setTimeout(() => this.animate(1), 1000);
+ this.animate(1);
}
componentWillUnmount() {
@@ -36,12 +36,12 @@ export default class Pulse extends Component {
Animated
.sequence([
Animated.timing(this.state.bounces[index], {
- toValue: 1,
+ toValue: index,
duration: 1000,
useNativeDriver: false
}),
Animated.timing(this.state.bounces[index], {
- toValue: 0,
+ toValue: !index,
duration: 1000,
useNativeDriver: false
})
This issue body was partially generated by patch-package.
Pull request for this issue: https://github.com/mohebifar/react-native-loader/pull/29
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading src/DoubleBounce.js and compare its componentDidMount and animate methods with the reported patch. Done means the DoubleBounce animation begins without the reported delay and alternates as expected; the issue body links pull request #29, so check that work before proceeding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100