@rnhooks/share

0.0.2 • Public • Published

@rnhooks/share Build Status Maintainability

React Native hook for Share

Installation

yarn add @rnhooks/share

Usage

import useShare from '@rnhooks/share';

function App() {
  const [onShare, shared, loading, error] = useShare();
  return (
    <View style={styles.container}>
      <Text style={styles.welcome}>@rnhooks/share</Text>
      <Button title="Share" onPress={onShare} />
      {!(loading || error) && (
        <Text style={styles.instructions}>{shared.toString()}</Text>
      )}
    </View>
  );
}

Output

Name Default Type Description
onShare () => {} function Share Function
shared false boolean Content is shared or not
activity null string Get Shared Activity
loading false boolean Loading State
error undefined boolean Error State

Dependencies (0)

    Dev Dependencies (36)

    Package Sidebar

    Install

    npm i @rnhooks/share

    Weekly Downloads

    0

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    25.6 kB

    Total Files

    11

    Last publish

    Collaborators

    • divyanshu013
    • pritishvaidya