From 5145ab39986cd7e5c3b8eeb37a48d68b9b30b9cf Mon Sep 17 00:00:00 2001 From: Bartosz Kaszubowski Date: Thu, 18 Jun 2020 16:08:30 +0200 Subject: [PATCH] changes from the Prettier run --- docs/native-modules-android.md | 2 +- docs/native-modules-ios.md | 2 +- docs/navigation.md | 8 ++++---- docs/network.md | 4 ++-- website/versioned_docs/version-0.5/accessibility.md | 12 ++++++++---- website/versioned_docs/version-0.62/accessibility.md | 12 ++++++++---- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/docs/native-modules-android.md b/docs/native-modules-android.md index a00adcfa688..40edee2544d 100644 --- a/docs/native-modules-android.md +++ b/docs/native-modules-android.md @@ -293,7 +293,7 @@ const measureLayout = async () => { } catch (e) { console.error(e); } -} +}; measureLayout(); ``` diff --git a/docs/native-modules-ios.md b/docs/native-modules-ios.md index 7ba51816945..7214614f4d5 100644 --- a/docs/native-modules-ios.md +++ b/docs/native-modules-ios.md @@ -232,7 +232,7 @@ const updateEvents = async () => { } catch (e) { console.error(e); } -} +}; updateEvents(); ``` diff --git a/docs/navigation.md b/docs/navigation.md index 8c7d2d87891..8b3b2f9184c 100644 --- a/docs/navigation.md +++ b/docs/navigation.md @@ -64,7 +64,7 @@ const App = () => { {/* Rest of your app code */} ); -} +}; export default App; ``` @@ -95,7 +95,7 @@ const MyStack = () => { ); -} +}; ``` In this example, there are 2 screens (`Home` and `Profile`) defined using the `Stack.Screen` component. Similarly, you can define as many screens as you like. @@ -114,10 +114,10 @@ const HomeScreen = ({ navigation }) => { } /> ); -} +}; const ProfileScreen = () => { return This is Jane's profile; -} +}; ``` The views in the stack navigator use native components and the [`Animated`](animated.md) library to deliver 60fps animations that are run on the native thread. Plus, the animations and gestures can be customized. diff --git a/docs/network.md b/docs/network.md index 7b88e47dd49..8cb6485cf27 100644 --- a/docs/network.md +++ b/docs/network.md @@ -51,7 +51,7 @@ const getMoviesFromApi = () => { .catch((error) => { console.error(error); }); -} +}; ``` You can also use the `async` / `await` syntax in a React Native app: @@ -67,7 +67,7 @@ const getMoviesFromApiAsync = async () => { } catch (error) { console.error(error); } -} +}; ``` Don't forget to catch any errors that may be thrown by `fetch`, otherwise they will be dropped silently. diff --git a/website/versioned_docs/version-0.5/accessibility.md b/website/versioned_docs/version-0.5/accessibility.md index cc48dfc26ae..3d2601c49d1 100644 --- a/website/versioned_docs/version-0.5/accessibility.md +++ b/website/versioned_docs/version-0.5/accessibility.md @@ -172,12 +172,12 @@ In the case of two overlapping UI components with the same parent, default acces ```jsx First layout Second layout @@ -248,12 +248,16 @@ The `AccessibilityInfo` API allows you to determine whether or not a screen read Sometimes it is useful to trigger an accessibility event on a UI component (i.e. when a custom view appears on a screen or set accessibility focus to a view). Native UIManager module exposes a method ‘sendAccessibilityEvent’ for this purpose. It takes two arguments: view tag and a type of an event. The supported event types are `typeWindowStateChanged`, `typeViewFocused` and `typeViewClicked`. ```jsx -import {Platform, UIManager, findNodeHandle} from 'react-native'; +import { + Platform, + UIManager, + findNodeHandle +} from 'react-native'; if (Platform.OS === 'android') { UIManager.sendAccessibilityEvent( findNodeHandle(this), - UIManager.AccessibilityEventTypes.typeViewFocused, + UIManager.AccessibilityEventTypes.typeViewFocused ); } ``` diff --git a/website/versioned_docs/version-0.62/accessibility.md b/website/versioned_docs/version-0.62/accessibility.md index 8e760d93ccc..91f854f3552 100644 --- a/website/versioned_docs/version-0.62/accessibility.md +++ b/website/versioned_docs/version-0.62/accessibility.md @@ -185,12 +185,12 @@ In the case of two overlapping UI components with the same parent, default acces ```jsx First layout Second layout @@ -261,12 +261,16 @@ The `AccessibilityInfo` API allows you to determine whether or not a screen read Sometimes it is useful to trigger an accessibility event on a UI component (i.e. when a custom view appears on a screen or set accessibility focus to a view). Native UIManager module exposes a method ‘sendAccessibilityEvent’ for this purpose. It takes two arguments: view tag and a type of an event. The supported event types are `typeWindowStateChanged`, `typeViewFocused` and `typeViewClicked`. ```jsx -import {Platform, UIManager, findNodeHandle} from 'react-native'; +import { + Platform, + UIManager, + findNodeHandle +} from 'react-native'; if (Platform.OS === 'android') { UIManager.sendAccessibilityEvent( findNodeHandle(this), - UIManager.AccessibilityEventTypes.typeViewFocused, + UIManager.AccessibilityEventTypes.typeViewFocused ); } ```