0.0.1 • Published 5 years ago
@rnhooks/camera-roll v0.0.1
@rnhooks/camera-roll
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: '',
},
};
0.0.1
5 years ago