From 4bcd62ebc45420948b78ba43f0155bdfaf99c96a Mon Sep 17 00:00:00 2001 From: Mitul Savani Date: Sun, 20 Oct 2019 17:10:21 -0700 Subject: [PATCH] fixed lint errors for v0.18 (#1417) --- .alexignore | 1 - website/versioned_docs/version-0.18/animated.md | 8 ++++---- website/versioned_docs/version-0.18/dimensions.md | 2 +- website/versioned_docs/version-0.18/imagestore.md | 4 ++-- website/versioned_docs/version-0.18/scrollview.md | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.alexignore b/.alexignore index 2e11754fa77..16a0001ca8d 100644 --- a/.alexignore +++ b/.alexignore @@ -10,4 +10,3 @@ website/blog/ # Once you fix all of the errors, commit all of the changes including this file. # # To be considerate to the reviewer, please submit each version in different PRs. -website/versioned_docs/version-0.18/ diff --git a/website/versioned_docs/version-0.18/animated.md b/website/versioned_docs/version-0.18/animated.md index aa73b4de4b6..3a2504520e4 100644 --- a/website/versioned_docs/version-0.18/animated.md +++ b/website/versioned_docs/version-0.18/animated.md @@ -4,7 +4,7 @@ title: Animated original_id: animated --- -Animations are an important part of modern UX, and the `Animated` library is designed to make them fluid, powerful, and easy to build and maintain. +Animations are an important part of modern UX, and the `Animated` library is designed to make them fluid, powerful, and possible to build and maintain. The simplest workflow is to create an `Animated.Value`, hook it up to one or more style attributes of an animated component, and then drive updates either via animations, such as `Animated.timing`, or by hooking into gestures like panning or scrolling via `Animated.event`. `Animated.Value` can also bind to props other than style, and can be interpolated as well. Here is a basic example of a container view that will fade in when it's mounted: @@ -36,7 +36,7 @@ class FadeInView extends React.Component { } ``` -Note that only animatable components can be animated. `View`, `Text`, and `Image` are already provided, and you can create custom ones with `createAnimatedComponent`. These special components do the magic of binding the animated values to the properties, and do targeted native updates to avoid the cost of the react render and reconciliation process on every frame. They also handle cleanup on unmount so they are safe by default. +Note that only animatable components can be animated. `View`, `Text`, and `Image` are already provided, and you can create custom ones with `createAnimatedComponent`. These particular components do the magic of binding the animated values to the properties, and do targeted native updates to avoid the cost of the react render and reconciliation process on every frame. They also handle cleanup on unmount so they are safe by default. Animations are heavily configurable. Custom and pre-defined easing functions, delays, durations, decay factors, spring constants, and more can all be tweaked depending on the type of animation. @@ -44,7 +44,7 @@ A single `Animated.Value` can drive any number of properties, and each property For example, you may want to think about your `Animated.Value` as going from 0 to 1, but animate the position from 150px to 0px and the opacity from 0 to -1. This can easily be done by modifying `style` in the example above like so: +1. This can be done by modifying `style` in the example above like so: ```jsx style={{ @@ -58,7 +58,7 @@ For example, you may want to think about your `Animated.Value` as going from 0 t }}> ``` -Animations can also be combined in complex ways using composition functions such as `sequence` and `parallel`, and can also be chained together simply by setting the `toValue` of one animation to be another `Animated.Value`. +Animations can also be combined in complex ways using composition functions such as `sequence` and `parallel`, and can also be chained together by setting the `toValue` of one animation to be another `Animated.Value`. `Animated.ValueXY` is handy for 2D animations, like panning, and there are other helpful additions like `setOffset` and `getLayout` to aid with typical interaction patterns, like drag-and-drop. diff --git a/website/versioned_docs/version-0.18/dimensions.md b/website/versioned_docs/version-0.18/dimensions.md index 087fec6228d..1f81f50bef0 100644 --- a/website/versioned_docs/version-0.18/dimensions.md +++ b/website/versioned_docs/version-0.18/dimensions.md @@ -23,7 +23,7 @@ static set(dims) This should only be called from native code. -@param {object} dims Simple string-keyed object of dimensions to set +@param {object} dims string-keyed object of dimensions to set --- diff --git a/website/versioned_docs/version-0.18/imagestore.md b/website/versioned_docs/version-0.18/imagestore.md index 09b95c2a45f..2c6d2a300f6 100644 --- a/website/versioned_docs/version-0.18/imagestore.md +++ b/website/versioned_docs/version-0.18/imagestore.md @@ -33,7 +33,7 @@ Check if the ImageStore contains image data for the specified URI. @platform ios static removeImageForTag(uri) ``` -Delete an image from the ImageStore. Images are stored in memory and must be manually removed when you are finished with them, otherwise they will continue to use up RAM until the app is terminated. It is safe to call `removeImageForTag()` without first calling `hasImageForTag()`, it will simply fail silently. @platform ios +Delete an image from the ImageStore. Images are stored in memory and must be manually removed when you are finished with them, otherwise they will continue to use up RAM until the app is terminated. It is safe to call `removeImageForTag()` without first calling `hasImageForTag()`, it will silently fail. @platform ios --- @@ -57,4 +57,4 @@ static getBase64ForTag(uri, success, failure) Retrieves the base64-encoded data for an image in the ImageStore. If the specified URI does not match an image in the store, the failure callback will be called. -Note that it is very inefficient to transfer large quantities of binary data between JS and native code, so you should avoid calling this more than necessary. To display an image in the ImageStore, you can just pass the URI to an `` component; there is no need to retrieve the base64 data. +Note that it is very inefficient to transfer large quantities of binary data between JS and native code, so you should avoid calling this more than necessary. To display an image in the ImageStore, you can pass the URI to an `` component; there is no need to retrieve the base64 data. diff --git a/website/versioned_docs/version-0.18/scrollview.md b/website/versioned_docs/version-0.18/scrollview.md index bba9b434edc..8e60fb211f4 100644 --- a/website/versioned_docs/version-0.18/scrollview.md +++ b/website/versioned_docs/version-0.18/scrollview.md @@ -6,7 +6,7 @@ original_id: scrollview Component that wraps platform ScrollView while providing integration with touch locking "responder" system. -Keep in mind that ScrollViews must have a bounded height in order to work, since they contain unbounded-height children into a bounded container (via a scroll interaction). In order to bound the height of a ScrollView, either set the height of the view directly (discouraged) or make sure all parent views have bounded height. Forgetting to transfer `{flex: 1}` down the view stack can lead to errors here, which the element inspector makes easy to debug. +Keep in mind that ScrollViews must have a bounded height in order to work, since they contain unbounded-height children into a bounded container (via a scroll interaction). In order to bound the height of a ScrollView, either set the height of the view directly (discouraged) or make sure all parent views have bounded height. Forgetting to transfer `{flex: 1}` down the view stack can lead to errors here, which the element inspector helps to debug. Doesn't yet support other contained responders from blocking this scroll view from becoming the responder.