diff --git a/docs/next/accessibility.html b/docs/next/accessibility.html index 3b12c46d2e2..4402239cd90 100644 --- a/docs/next/accessibility.html +++ b/docs/next/accessibility.html @@ -72,7 +72,7 @@ });
Edit

Accessibility

Native App Accessibility (iOS and Android)

Both iOS and Android provide APIs for making apps accessible to people with disabilities. In addition, both platforms provide bundled assistive technologies, like the screen readers VoiceOver (iOS) and TalkBack (Android) for the visually impaired. Similarly, in React Native we have included APIs designed to provide developers with support for making apps more accessible. Take note, iOS and Android differ slightly in their approaches, and thus the React Native implementations may vary by platform.

-

In addition to this documentation, you might find this blog post about React Native accessibility to be useful.

+

In addition to this documentation, you might find this blog post about React Native accessibility to be useful.

Making Apps Accessible

Accessibility properties

accessible (iOS, Android)

diff --git a/docs/next/accessibility/index.html b/docs/next/accessibility/index.html index 3b12c46d2e2..4402239cd90 100644 --- a/docs/next/accessibility/index.html +++ b/docs/next/accessibility/index.html @@ -72,7 +72,7 @@ });
Edit

Accessibility

Native App Accessibility (iOS and Android)

Both iOS and Android provide APIs for making apps accessible to people with disabilities. In addition, both platforms provide bundled assistive technologies, like the screen readers VoiceOver (iOS) and TalkBack (Android) for the visually impaired. Similarly, in React Native we have included APIs designed to provide developers with support for making apps more accessible. Take note, iOS and Android differ slightly in their approaches, and thus the React Native implementations may vary by platform.

-

In addition to this documentation, you might find this blog post about React Native accessibility to be useful.

+

In addition to this documentation, you might find this blog post about React Native accessibility to be useful.

Making Apps Accessible

Accessibility properties

accessible (iOS, Android)

diff --git a/docs/next/direct-manipulation.html b/docs/next/direct-manipulation.html index 3669264a7ef..1d2e41268dd 100644 --- a/docs/next/direct-manipulation.html +++ b/docs/next/direct-manipulation.html @@ -73,7 +73,7 @@
Edit

Direct Manipulation

It is sometimes necessary to make changes directly to a component without using state/props to trigger a re-render of the entire subtree. When using React in the browser for example, you sometimes need to directly modify a DOM node, and the same is true for views in mobile apps. setNativeProps is the React Native equivalent to setting properties directly on a DOM node.

Use setNativeProps when frequent re-rendering creates a performance bottleneck

-

Direct manipulation will not be a tool that you reach for frequently; you will typically only be using it for creating continuous animations to avoid the overhead of rendering the component hierarchy and reconciling many views. setNativeProps is imperative and stores state in the native layer (DOM, UIView, etc.) and not within your React components, which makes your code more difficult to reason about. Before you use it, try to solve your problem with setState and shouldComponentUpdate.

+

Direct manipulation will not be a tool that you reach for frequently; you will typically only be using it for creating continuous animations to avoid the overhead of rendering the component hierarchy and reconciling many views. setNativeProps is imperative and stores state in the native layer (DOM, UIView, etc.) and not within your React components, which makes your code more difficult to reason about. Before you use it, try to solve your problem with setState and shouldComponentUpdate.

setNativeProps with TouchableOpacity

TouchableOpacity uses setNativeProps internally to update the opacity of its child component:

@@ -109,7 +109,7 @@ }

This is computationally intensive compared to the original example - React needs to re-render the component hierarchy each time the opacity changes, even though other properties of the view and its children haven't changed. Usually this overhead isn't a concern but when performing continuous animations and responding to gestures, judiciously optimizing your components can improve your animations' fidelity.

-

If you look at the implementation of setNativeProps in NativeMethodsMixin you will notice that it is a wrapper around RCTUIManager.updateView - this is the exact same function call that results from re-rendering - see receiveComponent in ReactNativeBaseComponent.

+

If you look at the implementation of setNativeProps in NativeMethodsMixin you will notice that it is a wrapper around RCTUIManager.updateView - this is the exact same function call that results from re-rendering - see receiveComponent in ReactNativeBaseComponent.

Composite components and setNativeProps

Composite components are not backed by a native view, so you cannot call setNativeProps on them. Consider this example:

Edit

Direct Manipulation

It is sometimes necessary to make changes directly to a component without using state/props to trigger a re-render of the entire subtree. When using React in the browser for example, you sometimes need to directly modify a DOM node, and the same is true for views in mobile apps. setNativeProps is the React Native equivalent to setting properties directly on a DOM node.

Use setNativeProps when frequent re-rendering creates a performance bottleneck

-

Direct manipulation will not be a tool that you reach for frequently; you will typically only be using it for creating continuous animations to avoid the overhead of rendering the component hierarchy and reconciling many views. setNativeProps is imperative and stores state in the native layer (DOM, UIView, etc.) and not within your React components, which makes your code more difficult to reason about. Before you use it, try to solve your problem with setState and shouldComponentUpdate.

+

Direct manipulation will not be a tool that you reach for frequently; you will typically only be using it for creating continuous animations to avoid the overhead of rendering the component hierarchy and reconciling many views. setNativeProps is imperative and stores state in the native layer (DOM, UIView, etc.) and not within your React components, which makes your code more difficult to reason about. Before you use it, try to solve your problem with setState and shouldComponentUpdate.

setNativeProps with TouchableOpacity

TouchableOpacity uses setNativeProps internally to update the opacity of its child component:

@@ -109,7 +109,7 @@ }

This is computationally intensive compared to the original example - React needs to re-render the component hierarchy each time the opacity changes, even though other properties of the view and its children haven't changed. Usually this overhead isn't a concern but when performing continuous animations and responding to gestures, judiciously optimizing your components can improve your animations' fidelity.

-

If you look at the implementation of setNativeProps in NativeMethodsMixin you will notice that it is a wrapper around RCTUIManager.updateView - this is the exact same function call that results from re-rendering - see receiveComponent in ReactNativeBaseComponent.

+

If you look at the implementation of setNativeProps in NativeMethodsMixin you will notice that it is a wrapper around RCTUIManager.updateView - this is the exact same function call that results from re-rendering - see receiveComponent in ReactNativeBaseComponent.

Composite components and setNativeProps

Composite components are not backed by a native view, so you cannot call setNativeProps on them. Consider this example:

Handle push notifications for your app, including permission handling and icon badge number.

To get up and running, configure your notifications with Apple and your server-side system.

-

Add the PushNotificationIOS library to your Podfile: -./ios/Podfile

+

Add the PushNotificationIOS library to your Podfile: ./ios/Podfile

...
 target 'myAwesomeApp' do
   # Pods for myAwesomeApp
diff --git a/docs/next/pushnotificationios/index.html b/docs/next/pushnotificationios/index.html
index 4b6e094dd96..e515a289f50 100644
--- a/docs/next/pushnotificationios/index.html
+++ b/docs/next/pushnotificationios/index.html
@@ -80,8 +80,7 @@
 

Handle push notifications for your app, including permission handling and icon badge number.

To get up and running, configure your notifications with Apple and your server-side system.

-

Add the PushNotificationIOS library to your Podfile: -./ios/Podfile

+

Add the PushNotificationIOS library to your Podfile: ./ios/Podfile

...
 target 'myAwesomeApp' do
   # Pods for myAwesomeApp