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-scripts/template/README.md
+22
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ You can find the most recent version of this guide [here](https://github.com/fac
13
13
-[npm test](#npm-test)
14
14
-[npm run build](#npm-run-build)
15
15
-[npm run eject](#npm-run-eject)
16
+
-[Supported Language Features and Polyfills](#supported-language-features-and-polyfills)
16
17
-[Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor)
17
18
-[Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
18
19
-[Changing the Page `<title>`](#changing-the-page-title)
@@ -171,6 +172,27 @@ Instead, it will copy all the configuration files and the transitive dependencie
171
172
172
173
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
173
174
175
+
## Supported Language Features and Polyfills
176
+
177
+
The project supports a superset of the latest JavaScript standard.
178
+
In addition to ES6, it also supports:
179
+
180
+
*[JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax.
181
+
*[Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (stage 2 proposal).
Learn more about [different proposal stages](https://babeljs.io/docs/plugins/#presets-stage-x-experimental-presets-).
185
+
186
+
While we recommend to use 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.
187
+
188
+
Note that **the project only includes a few ES6 [polyfills](https://en.wikipedia.org/wiki/Polyfill)**:
189
+
190
+
*[`Object.assign()`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) via [`object-assign`](https://github.com/sindresorhus/object-assign).
191
+
*[`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) via [`promise`](https://github.com/then/promise).
192
+
*[`fetch()`](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) via [`whatwg-fetch`](https://github.com/github/fetch).
193
+
194
+
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.
195
+
174
196
## Syntax Highlighting in the Editor
175
197
176
198
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