0.0.2 • Published 5 years ago

@rnhooks/share v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@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

NameDefaultTypeDescription
onShare() => {}functionShare Function
sharedfalsebooleanContent is shared or not
activitynullstringGet Shared Activity
loadingfalsebooleanLoading State
errorundefinedbooleanError State