How to use react-native-airship - 1 common examples

To help you get started, we’ve selected a few react-native-airship examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EdgeApp / edge-react-gui / src / components / services / AirshipInstance.js View on Github external
// @flow

import React from 'react'
import { makeAirship } from 'react-native-airship'

import { AirshipToast } from '../common/AirshipToast.js'
import { AlertDropdown } from '../navigation/AlertDropdown.js'

export const Airship = makeAirship()

/**
 * Shows a message & activity spinner tied to the lifetime of a promise.
 */
export function showActivity (message: string, promise: Promise): Promise {
  Airship.show(bridge => )
  return promise
}

/**
 * Shows an error alert to the user.
 * Used when some user-requested operation fails.
 */
export function showError (error: mixed) {
  console.log(error)

react-native-airship

Flexible toolkit for building modals & alerts

MIT
Latest version published 10 months ago

Package Health Score

61 / 100
Full package analysis

Popular react-native-airship functions