Miss any of our Open RFC calls?Watch the recordings here! »

@madeagency/react-native-connection-alert

1.0.9 • Public • Published

react-native-connection-alert

Displays an alert which stays open until the specified network request succeeds

Installation

npm install --save @madeagency/react-native-connection-alert

Usage

Create a development config with Babel support, dev server, HMR and PostCSS autoprefixer:

import ConnectionAlert from '@madeagency/react-native-connection-alert'
 
async function fetchWhenConnected(input: string, init: any) {
  try {
    return await fetch(...arguments)
  } catch(error) {
    return await ConnectionAlert.fetch(...arguments)
  }
}