@madeagency/react-native-connection-alert
v1.0.12
Published
Displays an alert which stays open until the specified network request succeeds
Downloads
45
Maintainers
Readme
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)
}
}