Socket
Book a DemoInstallSign in
Socket

@computerrock/react-app-polyfill

Package Overview
Dependencies
Maintainers
9
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@computerrock/react-app-polyfill

Polyfills for commonly used language features

2.0.0
latest
Source
npmnpm
Version published
Maintainers
9
Created
Source

@computerrock/react-app-polyfill

This package provides polyfills for commonly used language features. It is based on Create React App package.

Usage

Install package by running:

npm install @computerrock/react-app-polyfill

Polyfilling language features

You can polyfill stable language features not available in your target browsers:

// must be the first line in src/index.js
import 'react-app-polyfill/stable';

// ...

Supporting Internet Explorer

These modules ensure the following language features are present:

  • Promise (for async / await support)
  • window.fetch (a Promise-based way to make web requests in the browser)
  • Object.assign (a helper required for Object Spread, i.e. { ...a, ...b })
  • Symbol (a built-in object used by for...of syntax and friends)
  • Array.from (a built-in static method used by array spread, i.e. [...arr])

You can import the entry point for the minimal version you intend to support to ensure that the minimum language features are present that are required:

// This must be the first line in src/index.js
import 'react-app-polyfill/ie11';
import 'react-app-polyfill/stable';

// ...

or:

// This must be the first line in src/index.js
import 'react-app-polyfill/ie9';
import 'react-app-polyfill/stable';

// ...

FAQs

Package last updated on 14 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.