Skip to content

Commit

Permalink
Add a sample to clarify animation callback
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdario authored Nov 9, 2017
1 parent e9393f6 commit a83d343
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Libraries/Animated/src/AnimatedImplementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,16 @@ const event = function(argMapping: Array<?Mapping>, config?: EventConfig): any {
* was called on it before it could finish (e.g. because it was interrupted by a
* gesture or another animation), then it will receive `{finished: false}`.
*
* ```javascript
* this.animateValue.spring({}).start(function onComplete({finished}) {
* if (finished === true) {
* console.log('Animation was stopped')
* } else {
* console.log('Animation was aborted')
* }
* })
* ```
*
* ### Using the native driver
*
* By using the native driver, we send everything about the animation to native
Expand Down

0 comments on commit a83d343

Please sign in to comment.