Skip to content

react-native-hooks/camera-roll

Repository files navigation

@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: '',
  },
};

About

React Native hook for Camera Roll

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published