@rnhooks/camera-roll

0.0.1 • Public • Published

@rnhooks/camera-roll Build Status Maintainability

React Native hook for Camera Roll

Installation

yarn add @rnhooks/camera-roll

Usage

import useCameraRoll from '@rnhooks/camera-roll';

function App() {
  const [photos, getPhotos, saveToCameraRoll, error] = useCameraRoll();

  return (
    <View style={styles.container}>
      <Text style={styles.welcome}>@rnhooks/camera-roll</Text>
      <Button title="Get Photos" onPress={getPhotos} />
    </View>
  );
}

Output

Name Default Type Description
photos Defaults object Photos Object
getPhotos (params) => {} function Get Photos Function
saveToCameraRoll () => {} function Save to Camera Roll Function
error undefined string Error string

Defaults

const initialState = {
  edges: [],
  page_info: {
    has_next_page: false,
    start_cursor: '',
    end_cursor: '',
  },
};

Package Sidebar

Install

npm i @rnhooks/camera-roll

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

25.8 kB

Total Files

11

Last publish

Collaborators

  • divyanshu013
  • pritishvaidya