Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

api-reach-react-native-fix

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-reach-react-native-fix

This is a ready-to-use fix to make [api-reach][1] work with React Native.

  • 1.0.0-beta.1
  • beta
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

api-reach-react-native-fix

This is a ready-to-use fix to make api-reach work with React Native.

api-reach is built on web standards. React Native however isn't fully compatible with web standards.

URL incompatibility

One big difference is that URL class is available in global scope, but it differs in implementation from web URL. See bug report. Fix is required to make it work.

AbortController incompatibility

Another thing - while fetch was available in React Native since beginning - aborting the request (using AbortController) is pretty new thing in React Native. Fix is required for older versions (< 0.60.0) of React Native.

Usage

How to use this fix? Put one line on the top of your main js file of your React Native application.

import "api-reach-react-native-fix";

Use this is above fails (for even older versions or React Native):

import "api-reach-react-native-fix/dist";

What does it do?

The fix:

  • feeds api-reach with custom URL implementation. It does not change global URL for full compatibility with React Native!
  • polyfills AbortController if needed and stores it in global. This won't do any harm for compatibility.

License

MIT

FAQs

Package last updated on 12 Jul 2019

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc