diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dde3cae8b537dd..b55d7aa0d1746b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -180,7 +180,7 @@ However, there are still some styles that the linter cannot pick up. #### JavaScript * Use semicolons; -* `'use strict';` +* ES6 standards * Prefer `'` over `"` * Do not use the optional parameters of `setTimeout` and `setInterval` * 80 character line length diff --git a/docs/CommunicationAndroid.md b/docs/CommunicationAndroid.md index abff60c5fb1386..133be47408c753 100644 --- a/docs/CommunicationAndroid.md +++ b/docs/CommunicationAndroid.md @@ -46,7 +46,6 @@ public class MainActivity extends ReactActivity { ``` ``` -'use strict'; import React from 'react'; import { diff --git a/docs/CommunicationIOS.md b/docs/CommunicationIOS.md index 704f6394496b29..7be7fb4a914ea4 100644 --- a/docs/CommunicationIOS.md +++ b/docs/CommunicationIOS.md @@ -39,7 +39,6 @@ RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge ``` ``` -'use strict'; import React from 'react'; import { diff --git a/docs/Contributing.md b/docs/Contributing.md index 7c4156d6ee4fcb..a4b9e384968dde 100644 --- a/docs/Contributing.md +++ b/docs/Contributing.md @@ -187,7 +187,7 @@ However, there are still some styles that the linter cannot pick up. #### JavaScript * Use semicolons; -* `'use strict';` +* ES6 standards * Prefer `'` over `"` * Do not use the optional parameters of `setTimeout` and `setInterval` * 80 character line length diff --git a/docs/CustomWebViewIOS.md b/docs/CustomWebViewIOS.md index 04f6eb8f9eb0cc..8c2d51f80c88fe 100644 --- a/docs/CustomWebViewIOS.md +++ b/docs/CustomWebViewIOS.md @@ -151,6 +151,7 @@ To use your custom web view, you'll need to create a class for it. Your class mu To get your native component, you must use `requireNativeComponent`: the same as for regular custom components. However, you must pass in an extra third argument, `WebView.extraNativeComponentConfig`. This third argument contains prop types that are only required for native code. ```js + import React, { Component, PropTypes } from 'react'; import { WebView, requireNativeComponent, NativeModules } from 'react-native'; const { CustomWebViewManager } = NativeModules; @@ -176,6 +177,7 @@ const RCTCustomWebView = requireNativeComponent( CustomWebView, WebView.extraNativeComponentConfig ); + ``` If you want to add custom props to your native component, you can use `nativeConfig.props` on the web view. For iOS, you should also set the `nativeConfig.viewManager` prop with your custom WebView ViewManager as in the example above. diff --git a/docs/IntegrationWithExistingApps.md b/docs/IntegrationWithExistingApps.md index 4f543aa3a3a292..8316005657c214 100644 --- a/docs/IntegrationWithExistingApps.md +++ b/docs/IntegrationWithExistingApps.md @@ -305,7 +305,6 @@ First, create an empty `index.js` file in the root of your React Native project. In your `index.js`, create your component. In our sample here, we will add simple `` component within a styled `` ```javascript -'use strict'; import React from 'react'; import { @@ -600,7 +599,6 @@ First, create an empty `index.js` file in the root of your React Native project. In your `index.js`, create your component. In our sample here, we will add simple `` component within a styled ``: ```javascript -'use strict'; import React from 'react'; import { diff --git a/docs/NativeModulesAndroid.md b/docs/NativeModulesAndroid.md index ab806741e307b0..e4365f187c9f83 100644 --- a/docs/NativeModulesAndroid.md +++ b/docs/NativeModulesAndroid.md @@ -144,7 +144,6 @@ protected List getPackages() { To make it simpler to access your new functionality from JavaScript, it is common to wrap the native module in a JavaScript module. This is not necessary but saves the consumers of your library the need to pull it off of `NativeModules` each time. This JavaScript file also becomes a good location for you to add any JavaScript side functionality. ```js -'use strict'; /** * This exposes the native ToastExample module as a JS module. This has a * function 'show' which takes the following parameters: