You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is fine to update properties anytime. However, updates have to be performed on the main thread. You use the getter on any thread.
62
62
63
+
> **_Note:_** Currently, there is a known issue where setting appProperties during the bridge startup, the change can be lost. See https://github.com/facebook/react-native/issues/20115 for more information.
64
+
63
65
There is no way to update only a few properties at a time. We suggest that you build it into your own wrapper instead.
64
66
65
67
> **_Note:_** Currently, JS functions `componentWillReceiveProps` and `componentWillUpdateProps` of the top level RN component will not be called after a prop update. However, you can access the new props in `componentWillMount` function.
Copy file name to clipboardExpand all lines: website/versioned_docs/version-0.5/direct-manipulation.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,11 @@ Determines the location of the given view in the window and returns the values v
192
192
193
193
Like `measure()`, but measures the view relative an ancestor, specified as `relativeToNativeNode`. This means that the returned x, y are relative to the origin x, y of the ancestor view.
194
194
195
-
As always, to obtain a native node handle for a component, you can use `ReactNative.findNodeHandle(component)`.
195
+
As always, to obtain a native node handle for a component, you can use `findNodeHandle(component)`.
Copy file name to clipboardExpand all lines: website/versioned_docs/version-0.5/getting-started.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ Then run the following commands to create a new React Native project called "Awe
109
109
expo init AwesomeProject
110
110
111
111
cd AwesomeProject
112
-
npm start
112
+
npm start#you can also use: expo start
113
113
```
114
114
115
115
This will start a development server for you.
@@ -310,7 +310,7 @@ Setting up your development environment can be somewhat tedious if you're new to
310
310
311
311
*`Android SDK`
312
312
*`Android SDK Platform`
313
-
*`Performance (Intel ® HAXM)`
313
+
*`Performance (Intel ® HAXM)` ([See here for AMD](https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html))
314
314
*`Android Virtual Device`
315
315
316
316
<blockclass="native linux android" />
@@ -406,6 +406,16 @@ You can find the actual location of the SDK in the Android Studio "Preferences"
406
406
407
407
Open a new Command Prompt window to ensure the new environment variable is loaded before proceeding to the next step.
408
408
409
+
#### 4. Add platform-tools to Path
410
+
411
+
Open the System pane under **System and Security** in the Windows Control Panel, then click on **Change settings...**. Open the **Advanced** tab and click on **Environment Variables...**. Select the **Path** variable, then click **Edit**. Click **New** and add the path to platform-tools to the list.
@@ -436,7 +446,7 @@ Use the React Native command line interface to generate a new React Native proje
436
446
react-native init AwesomeProject
437
447
```
438
448
439
-
This is not necessary if you are integrating React Native into an existing application, if you "ejected" from Create React Native App, or if you're adding Android support to an existing React Native project (see [Platform Specific Code](platform-specific-code.md)).
449
+
This is not necessary if you are integrating React Native into an existing application, if you "ejected" from Create React Native App, or if you're adding Android support to an existing React Native project (see [Platform Specific Code](platform-specific-code.md)). You can also use a third-party CLI to init your React Native app, such as [Ignite CLI](https://github.com/infinitered/ignite).
Copy file name to clipboardExpand all lines: website/versioned_docs/version-0.5/images.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,9 +66,9 @@ Note that image sources required this way include size (width, height) info for
66
66
67
67
## Static Non-Image Resources
68
68
69
-
The `require` syntax described above can be used to statically include audio, video or document files in your project as well. Most common file types are supported including `.mp3`, `.wav`, `.mp4`, `.mov`, `.html` and `.pdf`. See [packager defaults](https://github.com/facebook/react-native/blob/master/local-cli/util/Config.js#L68) for the full list.
69
+
The `require` syntax described above can be used to statically include audio, video or document files in your project as well. Most common file types are supported including `.mp3`, `.wav`, `.mp4`, `.mov`, `.html` and `.pdf`. See [packager defaults](https://github.com/facebook/metro/blob/master/packages/metro-config/src/defaults/defaults.js#L14-L44) for the full list.
70
70
71
-
You can add support for other types by creating a packager config file (see the [packager config file](https://github.com/facebook/metro/blob/master/packages/metro-config/src/defaults/defaults.js#L14-L44) for the full list of configuration options).
71
+
You can add support for other types by creating a packager config file (see the [packager config file](https://github.com/facebook/react-native/blob/master/local-cli/util/Config.js#L68) for the full list of configuration options).
72
72
73
73
A caveat is that videos must use absolute positioning instead of `flexGrow`, since size info is not currently passed for non-image assets. This limitation doesn't occur for videos that are linked directly into Xcode or the Assets folder for Android.
[Try it on your phone](https://snack.expo.io/H1iGt2vSW)
22
22
23
23
## Manage layout when keyboard is visible
24
24
25
25
Software keyboard takes almost half of the screen. If you have interactive elements that can get covered by the keyboard, make sure they are still accessible by using the [`KeyboardAvoidingView` component](keyboardavoidingview.md).
[Try it on your phone](https://snack.expo.io/ryxRkwnrW)
30
30
31
31
## Make tappable areas larger
32
32
33
33
On mobile phones it's hard to be very precise when pressing buttons. Make sure all interactive elements are 44x44 or larger. One way to do this is to leave enough space for the element, `padding`, `minWidth` and `minHeight` style values can be useful for that. Alternatively, you can use [`hitSlop` prop](touchablewithoutfeedback.md#hitslop) to increase interactive area without affecting the layout. Here's a demo:
[Try it on your phone](https://snack.expo.io/rJPwCt4HZ)
38
38
39
39
## Use Android Ripple
40
40
41
41
Android API 21+ uses the material design ripple to provide user with feedback when they touch an interactable area on the screen. React Native exposes this through the [`TouchableNativeFeedback` component](touchablenativefeedback.md). Using this touchable effect instead of opacity or highlight will often make your app feel much more fitting on the platform. That said, you need to be careful when using it because it doesn't work on iOS or on Android API < 21, so you will need to fallback to using one of the other Touchable components on iOS. You can use a library like [react-native-platform-touchable](https://github.com/react-community/react-native-platform-touchable) to handle the platform differences for you.
Copy file name to clipboardExpand all lines: website/versioned_docs/version-0.5/more-resources.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,4 +39,6 @@ The folks who built the app for Facebook's F8 conference also [open-sourced the
39
39
40
40
[Yoga](https://yogalayout.com/) is a stand-alone layout engine that extends beyond React Native and allows product engineers to build layouts quickly for multiple platforms with a highly optimized open source layout engine designed with speed, size, and ease of use in mind.
41
41
42
+
[Bugsnag](https://www.bugsnag.com/), [Microsoft App Center](https://appcenter.ms/), and [Sentry](https://sentry.io/welcome/) all provide excellent crash and error monitoring services for React and React Native apps. These services allow you to proactively monitor crashes and issues occuring on your apps in real time so you can fix them quickly and improve user experience.
43
+
42
44
The [React Developer Tools](debugging.md#react-developer-tools) are great for debugging React and React Native apps.
0 commit comments