as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容

JavaScript runtime

When using React Native for Vega, you will always use Hermes, an open-source JavaScript engine optimized for React Native. On Vega, we don’t support using JavaScriptCore or Chrome (including V8) itself for tasks such as debugging. Hermes is mainly used in the context of React Native and its roadmap follows the versions of React Native. Your Hermes version depends on the React Native version you are using, for example, 0.72.

JavaScript syntax transformers

Syntax transformers make writing code more enjoyable by allowing you to use new JavaScript syntax without having to wait for support on all interpreters. React Native ships with the Babel JavaScript compiler. Check Babel documentation on its supported transformations for more details. A full list of React Native’s enabled transformations can be found in @react-native/babel-preset.

Polyfills

Many standard functions are also available on all the supported JavaScript runtimes.

Browser

ECMAScript 2015 (ES6)

  • Array.from
  • Array.prototype.{[find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find), [findIndex](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex)}
  • Object.assign
  • String.prototype.{[startsWith](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith), [endsWith](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith), [repeat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat), [includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes)}

ECMAScript 2016 (ES7)

  • Array.prototype.[includes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes)

ECMAScript 2017 (ES8)

  • Object.{[entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries), [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values)}

Specific

  • __DEV__

最后修改于 2026年10月26日