Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize docs: remove 'use strict' from docs -- es6 has 'use strict' by default #16163

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion docs/CommunicationAndroid.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public class MainActivity extends ReactActivity {
```

```
'use strict';

import React from 'react';
import {
Expand Down
1 change: 0 additions & 1 deletion docs/CommunicationIOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
```

```
'use strict';

import React from 'react';
import {
Expand Down
2 changes: 1 addition & 1 deletion docs/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/CustomWebViewIOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions docs/IntegrationWithExistingApps.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<Text>` component within a styled `<View>`

```javascript
'use strict';

import React from 'react';
import {
Expand Down Expand Up @@ -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 `<Text>` component within a styled `<View>`:

```javascript
'use strict';

import React from 'react';
import {
Expand Down
1 change: 0 additions & 1 deletion docs/NativeModulesAndroid.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ protected List<ReactPackage> 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:
Expand Down