Skip to content

JS environment-requirements #68

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

Merged
merged 4 commits into from
Feb 16, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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 content/docs/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
- id: test-renderer
title: Test Renderer
- id: javascript-environment-requirements
title: JS Environment Requirements
title: Требования к среде JS
- id: glossary
title: Glossary
- title: Хуки (Новое)
Expand Down
10 changes: 5 additions & 5 deletions content/docs/reference-javascript-environment-requirements.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
id: javascript-environment-requirements
title: JavaScript Environment Requirements
title: Требования к среде JavaScript
layout: docs
category: Reference
permalink: docs/javascript-environment-requirements.html
---

React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set). If you support older browsers and devices which may not yet provide these natively (e.g. IE < 11) or which have non-compliant implementations (e.g. IE 11), consider including a global polyfill in your bundled application, such as [core-js](https://github.com/zloirock/core-js) or [babel-polyfill](https://babeljs.io/docs/usage/polyfill/).
React 16 полагается на типы коллекций [Map](https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Map) и [Set](https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Set). Если вы поддерживаете старые браузеры и устройства, которые могут не поддерживать эти типы коллекций (например, IE < 11) или которые имеют несоответствующую реализацию (например, IE 11), вы можете включить глобальный полифил в ваше приложение, например [core-js](https://github.com/zloirock/core-js) или [babel-polyfill](https://babeljs.io/docs/usage/polyfill/).

A polyfilled environment for React 16 using core-js to support older browsers might look like:
Окружающая среда с полифилом для React 16 использующая core-js для поддержки старых браузеров может выглядеть следующим образом:

```js
import 'core-js/es6/map';
Expand All @@ -23,8 +23,8 @@ ReactDOM.render(
);
```

React also depends on `requestAnimationFrame` (even in test environments).
You can use the [raf](https://www.npmjs.com/package/raf) package to shim `requestAnimationFrame`:
React также полагается на `requestAnimationFrame` (даже в тестовом окружении).
Вы можете использовать пакет [raf](https://www.npmjs.com/package/raf) для создания шима `requestAnimationFrame`:

```js
import 'raf/polyfill';
Expand Down