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
Copy file name to clipboardexpand all lines: packages/react-app-polyfill/README.md
+11-7
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,7 @@
1
1
# react-app-polyfill
2
2
3
3
This package includes polyfills for various browsers.
4
-
It includes minimum requirements and commonly used language features used by [Create React App](https://github.com/facebook/create-react-app) projects.<br>
5
-
Please refer to its documentation:
6
-
7
-
-[Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
8
-
-[User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
4
+
It includes minimum requirements and commonly used language features used by [Create React App](https://github.com/facebook/create-react-app) projects.
9
5
10
6
### Features
11
7
@@ -17,9 +13,17 @@ Each polyfill ensures the following language features are present:
17
13
1.`Symbol` (a built-in object used by `for...of` syntax and friends)
18
14
1.`Array.from` (a built-in static method used by array spread, i.e. `[...arr]`)
19
15
20
-
### Entry Points
16
+
### Usage
17
+
18
+
First, install the package using Yarn or npm:
19
+
20
+
```bash
21
+
$ npm install react-app-polyfill --save
22
+
$ # or
23
+
$ yarn add react-app-polyfill
24
+
```
21
25
22
-
You can import the entry point for the minimal version you intend to support. For example, if you import the IE9 entry point, this will include IE10 and IE11 support.
26
+
Now, you can import the entry point for the minimal version you intend to support. For example, if you import the IE9 entry point, this will include IE10 and IE11 support.
Copy file name to clipboardexpand all lines: packages/react-scripts/template/README.md
+5-12
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
14
14
-[npm run build](#npm-run-build)
15
15
-[npm run eject](#npm-run-eject)
16
16
-[Supported Browsers](#supported-browsers)
17
-
-[Supported Language Features and Polyfills](#supported-language-features-and-polyfills)
17
+
-[Supported Language Features](#supported-language-features)
18
18
-[Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor)
19
19
-[Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
20
20
-[Debugging in the Editor](#debugging-in-the-editor)
@@ -203,11 +203,10 @@ You don’t have to ever use `eject`. The curated feature set is suitable for sm
203
203
204
204
## Supported Browsers
205
205
206
-
By default, the generated project uses the latest version of React.
206
+
By default, the generated project supports all modern browsers.<br>
207
+
Support for Internet Explorer 9, 10, and 11 requires [polyfills](https://github.com/facebook/create-react-app/blob/next/packages/react-app-polyfill/README.md).
207
208
208
-
You can refer [to the React documentation](https://reactjs.org/docs/react-dom.html#browser-support) for more information about supported browsers.
209
-
210
-
## Supported Language Features and Polyfills
209
+
### Supported Language Features
211
210
212
211
This project supports a superset of the latest JavaScript standard.<br>
213
212
In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, it also supports:
@@ -223,16 +222,10 @@ Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#pr
223
222
224
223
While we recommend using experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future.
225
224
226
-
Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**:
227
-
228
-
-[`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign).
229
-
-[`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise).
230
-
-[`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch).
225
+
Note that **this project includes no [polyfills](https://en.wikipedia.org/wiki/Polyfill)** by default.
231
226
232
227
If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are including the appropriate polyfills manually, or that the browsers you are targeting already support them.
233
228
234
-
Also note that using some newer syntax features like `for...of` or `[...nonArrayValue]` causes Babel to emit code that depends on ES6 runtime features and might not work without a polyfill. When in doubt, use [Babel REPL](https://babeljs.io/repl/) to see what any specific syntax compiles down to.
235
-
236
229
## Syntax Highlighting in the Editor
237
230
238
231
To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered.
0 commit comments