How to use the react-native-airship.makeAirship function in react-native-airship

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 1 year ago

Package Health Score

49 / 100
Full package analysis

Popular react-native-airship functions