Skip to content

Commit

Permalink
api/javascript-environment-requirements (#12)
Browse files Browse the repository at this point in the history
* Add translation

* Update translation

* Update content/docs/reference-javascript-environment-requirements.md

Co-Authored-By: ph1p <phil@capshake.com>
  • Loading branch information
ph1p committed Feb 25, 2019
1 parent 0647f25 commit 755b9ea
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions content/docs/reference-javascript-environment-requirements.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
---
id: javascript-environment-requirements
title: JavaScript Environment Requirements
title: Anforderungen an die JavaScript-Umgebung
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 ist von den Objekten [Map](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Map) und [Set](https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Set) abhängig.
Wenn du ältere Browser oder Geräte unterstützen möchtest, die diese Funktionaltät nicht implementiert haben (z. B. IE < 11) oder nicht Standardkonform sind (z. B. IE 11), dann solltest du einen globalen
Polyfill wie z. B. [core-js](https://github.com/zloirock/core-js) oder [babel-polyfill](https://babeljs.io/docs/usage/polyfill/), in deine gebaute Anwendung laden.

A polyfilled environment for React 16 using core-js to support older browsers might look like:
Eine Anwendung für React 16 sollte wie folgt aussehen, wenn sie mit der Hilfe von
core-js gepolyfilled wird um älteren Browsern zur Verfügung gestellt zu werden:

```js
import 'core-js/es6/map';
Expand All @@ -18,13 +21,13 @@ import React from 'react';
import ReactDOM from 'react-dom';

ReactDOM.render(
<h1>Hello, world!</h1>,
<h1>Hallo Welt!</h1>,
document.getElementById('root')
);
```

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 ist auch von `requestAnimationFrame` abhängig (sogar in Testumgebungen).
Du kannst [raf](https://www.npmjs.com/package/raf) benutzen um `requestAnimationFrame` zu unterdrücken:

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

0 comments on commit 755b9ea

Please sign in to comment.