Skip to content

Commit 270defd

Browse files
hramoscharpeni
authored andcommitted
Bump docs to v0.58 (facebook#756)
* Replace old forum with a link to the community page * v0.58
1 parent eaafd70 commit 270defd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+12916
-28
lines changed

website/core/Footer.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ class Footer extends React.Component {
4444
</a>
4545
</div>
4646
<div>
47-
<h5>
48-
<a href={this.props.config.baseUrl + 'help.html'}>Community</a>
49-
</h5>
47+
<h5>Community</h5>
48+
<a href={this.props.config.baseUrl + 'help.html'}>
49+
Community Resources
50+
</a>
5051
<a href={this.props.config.baseUrl + 'showcase.html'}>
5152
Who's using React Native?
5253
</a>
@@ -55,9 +56,6 @@ class Footer extends React.Component {
5556
target="_blank">
5657
Stack Overflow
5758
</a>
58-
<a href="https://discuss.reactjs.org" target="_blank">
59-
Discussion Forum
60-
</a>
6159
<a href="https://discord.gg/0ZcbPKXt5bZjGY5n">Reactiflux Chat</a>
6260
</div>
6361
<div>

website/siteConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
const RemarkablePlugins = require('./core/RemarkablePlugins');
99

1010
const users = require('./showcase.json');
11-
const defaultVersionShown = '0.57';
11+
const defaultVersionShown = '0.58';
1212
const baseUrl = '/react-native/';
1313
const repoUrl = 'https://github.com/facebook/react-native';
1414
const siteConfig = {

website/versioned_docs/version-0.5/building-from-source.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Add `gradle-download-task` as dependency in `android/build.gradle`:
7373
```gradle
7474
...
7575
dependencies {
76-
classpath 'com.android.tools.build:gradle:2.3.3'
76+
classpath 'com.android.tools.build:gradle:3.1.4'
7777
classpath 'de.undercouch:gradle-download-task:3.1.2'
7878
7979
// NOTE: Do not place your application dependencies here; they belong
@@ -101,7 +101,7 @@ Modify your `android/app/build.gradle` to use the `:ReactAndroid` project instea
101101
...
102102
dependencies {
103103
implementation fileTree(dir: 'libs', include: ['*.jar'])
104-
implementation 'com.android.support:appcompat-v7:26.0.2'
104+
implementation 'com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}'
105105
106106
implementation project(':ReactAndroid')
107107

website/versioned_docs/version-0.5/communication-ios.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ rootView.appProperties = @{@"images" : imageList};
6060
6161
It is fine to update properties anytime. However, updates have to be performed on the main thread. You use the getter on any thread.
6262
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+
6365
There is no way to update only a few properties at a time. We suggest that you build it into your own wrapper instead.
6466
6567
> **_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.

website/versioned_docs/version-0.5/direct-manipulation.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,11 @@ Determines the location of the given view in the window and returns the values v
192192

193193
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.
194194

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)`.
196+
197+
```javascript
198+
import {findNodeHandle} from 'react-native';
199+
```
196200

197201
### focus()
198202

website/versioned_docs/version-0.5/getting-started.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Then run the following commands to create a new React Native project called "Awe
109109
expo init AwesomeProject
110110

111111
cd AwesomeProject
112-
npm start
112+
npm start #you can also use: expo start
113113
```
114114

115115
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
310310

311311
* `Android SDK`
312312
* `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))
314314
* `Android Virtual Device`
315315

316316
<block class="native linux android" />
@@ -406,6 +406,16 @@ You can find the actual location of the SDK in the Android Studio "Preferences"
406406

407407
Open a new Command Prompt window to ensure the new environment variable is loaded before proceeding to the next step.
408408

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.
412+
413+
The default location for this folder is:
414+
415+
```powershell
416+
c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools
417+
```
418+
409419
<block class="native linux android" />
410420

411421
### Watchman
@@ -436,7 +446,7 @@ Use the React Native command line interface to generate a new React Native proje
436446
react-native init AwesomeProject
437447
```
438448

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).
440450

441451
<block class="native mac windows linux android" />
442452

website/versioned_docs/version-0.5/images.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ Note that image sources required this way include size (width, height) info for
6666

6767
## Static Non-Image Resources
6868

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.
7070

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).
7272

7373
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.
7474

website/versioned_docs/version-0.5/improvingux.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,31 @@ Entering text on touch phone is a challenge - small screen, software keyboard. B
1616

1717
Check out [`TextInput` docs](textinput.md) for more configuration options.
1818

19-
<video src="/react-native/img/textinput.mp4" autoplay loop width="320" height="430"></video>
19+
<video src="/react-native/img/textinput.mp4" muted autoplay loop width="320" height="430"></video>
2020

2121
[Try it on your phone](https://snack.expo.io/H1iGt2vSW)
2222

2323
## Manage layout when keyboard is visible
2424

2525
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).
2626

27-
<video src="/react-native/img/keyboardavoidingview.mp4" autoplay loop width="320" height="448"></video>
27+
<video src="/react-native/img/keyboardavoidingview.mp4" muted autoplay loop width="320" height="448"></video>
2828

2929
[Try it on your phone](https://snack.expo.io/ryxRkwnrW)
3030

3131
## Make tappable areas larger
3232

3333
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:
3434

35-
<video src="/react-native/img/hitslop.mp4" autoplay loop width="320" height="120"></video>
35+
<video src="/react-native/img/hitslop.mp4" muted autoplay loop width="320" height="120"></video>
3636

3737
[Try it on your phone](https://snack.expo.io/rJPwCt4HZ)
3838

3939
## Use Android Ripple
4040

4141
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.
4242

43-
<video src="/react-native/img/ripple.mp4" autoplay loop width="320"></video>
43+
<video src="/react-native/img/ripple.mp4" muted autoplay loop width="320"></video>
4444

4545
[Try it on your phone](https://snack.expo.io/SJywqe3rZ)
4646

website/versioned_docs/version-0.5/more-resources.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,6 @@ The folks who built the app for Facebook's F8 conference also [open-sourced the
3939

4040
[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.
4141

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+
4244
The [React Developer Tools](debugging.md#react-developer-tools) are great for debugging React and React Native apps.

website/versioned_docs/version-0.5/native-modules-ios.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ RCT_EXPORT_METHOD(addEvent:(NSString *)name location:(NSString *)location)
5959
{
6060
RCTLogInfo(@"Pretending to create an event %@ at %@", name, location);
6161
}
62+
63+
@end
6264
```
6365

6466
Now, from your JavaScript file you can call the method like this:

0 commit comments

Comments
 (0)