diff --git a/docs/next/animations.html b/docs/next/animations.html index bad77a90ab3..6c4ef40bac4 100644 --- a/docs/next/animations.html +++ b/docs/next/animations.html @@ -81,7 +81,7 @@ const FadeInView = (props) => { const [fadeAdmin] = useState(new Animated.Value(0)) // Initial value for opacity: 0 - + React.useEffect(() => { Animated.timing( fadeAdmin, @@ -117,7 +117,7 @@ export default () => {
const FadeInView = (props) => { const [fadeAdmin] = useState(new Animated.Value(0)) // Initial value for opacity: 0 - + React.useEffect(() => { Animated.timing( fadeAdmin, @@ -117,7 +117,7 @@ export default () => {
see Modal docs).

+

The event subscriptions are called in reverse order (i.e. last registered subscription first), and if one subscription returns true then subscriptions registered earlier will not be called. Beware: If your app shows an opened Modal, BackHandler will not publish any events (see Modal docs).

Example:

BackHandler.addEventListener('hardwareBackPress', function() {
   // this.onMainScreen and this.goBack are just examples, you need to use your own implementation here
diff --git a/docs/next/backhandler/index.html b/docs/next/backhandler/index.html
index db09b545f18..4d56610e1de 100644
--- a/docs/next/backhandler/index.html
+++ b/docs/next/backhandler/index.html
@@ -74,8 +74,7 @@
 

Android: Detect hardware back button presses, and programmatically invoke the default back button functionality to exit the app if there are no listeners or if none of the listeners return true.

tvOS: Detect presses of the menu button on the TV remote. (Still to be implemented: programmatically disable menu button handling functionality to exit the app if there are no listeners or if none of the listeners return true.)

iOS: Not applicable.

-

The event subscriptions are called in reverse order (i.e. last registered subscription first), and if one subscription returns true then subscriptions registered earlier will not be called. -Beware: If your app shows an opened Modal, BackHandler will not publish any events (see Modal docs).

+

The event subscriptions are called in reverse order (i.e. last registered subscription first), and if one subscription returns true then subscriptions registered earlier will not be called. Beware: If your app shows an opened Modal, BackHandler will not publish any events (see Modal docs).

Example:

BackHandler.addEventListener('hardwareBackPress', function() {
   // this.onMainScreen and this.goBack are just examples, you need to use your own implementation here
diff --git a/docs/next/layoutanimation.html b/docs/next/layoutanimation.html
index 682ef7defa2..d418834069a 100644
--- a/docs/next/layoutanimation.html
+++ b/docs/next/layoutanimation.html
@@ -74,9 +74,9 @@
 

A common way to use this API is to call it before calling setState.

Note that in order to get this to work on Android you need to set the following flags via UIManager:

if (Platform.OS === 'android') {
-    if (UIManager.setLayoutAnimationEnabledExperimental) {
-        UIManager.setLayoutAnimationEnabledExperimental(true);
-    }
+  if (UIManager.setLayoutAnimationEnabledExperimental) {
+    UIManager.setLayoutAnimationEnabledExperimental(true);
+  }
 }
 

Example usage:

diff --git a/docs/next/layoutanimation/index.html b/docs/next/layoutanimation/index.html index 682ef7defa2..d418834069a 100644 --- a/docs/next/layoutanimation/index.html +++ b/docs/next/layoutanimation/index.html @@ -74,9 +74,9 @@

A common way to use this API is to call it before calling setState.

Note that in order to get this to work on Android you need to set the following flags via UIManager:

if (Platform.OS === 'android') {
-    if (UIManager.setLayoutAnimationEnabledExperimental) {
-        UIManager.setLayoutAnimationEnabledExperimental(true);
-    }
+  if (UIManager.setLayoutAnimationEnabledExperimental) {
+    UIManager.setLayoutAnimationEnabledExperimental(true);
+  }
 }
 

Example usage:

diff --git a/docs/next/typescript.html b/docs/next/typescript.html index 6ed4ea0a4f5..1fff80d0e7f 100644 --- a/docs/next/typescript.html +++ b/docs/next/typescript.html @@ -1,5 +1,5 @@ -Using TypeScript with React Native · React NativeUsing TypeScript with React Native · React Native
Edit

Using TypeScript with React Native

TypeScript is a language which extends JavaScript by adding type definitions, much like Flow. -While React Native is built in Flow, it supports both TypeScript and Flow by default.

+
Edit

Using TypeScript with React Native

TypeScript is a language which extends JavaScript by adding type definitions, much like Flow. While React Native is built in Flow, it supports both TypeScript and Flow by default.

Getting Started with TypeScript

If you're starting a new project, there are a few different ways to get started. You can use the TypeScript template:

react-native init MyTSProject --template typescript
@@ -129,8 +128,7 @@ npm install --save-dev @types/jest @types/react @types/react-native @types/react
 
  • Run yarn tsc to type-check your new TypeScript files.

  • How TypeScript and React Native works

    -

    Out of the box, transforming your files to JavaScript works via the same Babel infrastructure as a non-TypeScript React Native project. We recommend that you use the TypeScript compiler only for type checking. If you have existing TypeScript code being ported to React Native, there are one or two caveats -to using Babel instead of TypeScript.

    +

    Out of the box, transforming your files to JavaScript works via the same Babel infrastructure as a non-TypeScript React Native project. We recommend that you use the TypeScript compiler only for type checking. If you have existing TypeScript code being ported to React Native, there are one or two caveats to using Babel instead of TypeScript.

    What does React Native + TypeScript look like

    You can provide an interface for a React Component's Props and State via React.Component<Props, State> which will provide type-checking and editor auto-completing when working with that component in JSX.

    // components/Hello.tsx
    diff --git a/docs/next/typescript/index.html b/docs/next/typescript/index.html
    index 6ed4ea0a4f5..1fff80d0e7f 100644
    --- a/docs/next/typescript/index.html
    +++ b/docs/next/typescript/index.html
    @@ -1,5 +1,5 @@
    -Using TypeScript with React Native · React NativeUsing TypeScript with React Native · React Native
    Edit

    Using TypeScript with React Native

    TypeScript is a language which extends JavaScript by adding type definitions, much like Flow. -While React Native is built in Flow, it supports both TypeScript and Flow by default.

    +
    Edit

    Using TypeScript with React Native

    TypeScript is a language which extends JavaScript by adding type definitions, much like Flow. While React Native is built in Flow, it supports both TypeScript and Flow by default.

    Getting Started with TypeScript

    If you're starting a new project, there are a few different ways to get started. You can use the TypeScript template:

    react-native init MyTSProject --template typescript
    @@ -129,8 +128,7 @@ npm install --save-dev @types/jest @types/react @types/react-native @types/react
     
  • Run yarn tsc to type-check your new TypeScript files.

  • How TypeScript and React Native works

    -

    Out of the box, transforming your files to JavaScript works via the same Babel infrastructure as a non-TypeScript React Native project. We recommend that you use the TypeScript compiler only for type checking. If you have existing TypeScript code being ported to React Native, there are one or two caveats -to using Babel instead of TypeScript.

    +

    Out of the box, transforming your files to JavaScript works via the same Babel infrastructure as a non-TypeScript React Native project. We recommend that you use the TypeScript compiler only for type checking. If you have existing TypeScript code being ported to React Native, there are one or two caveats to using Babel instead of TypeScript.

    What does React Native + TypeScript look like

    You can provide an interface for a React Component's Props and State via React.Component<Props, State> which will provide type-checking and editor auto-completing when working with that component in JSX.

    // components/Hello.tsx