react-native-unsplash

0.0.9 • Public • Published

react-native-unsplash

Online photos gallery search using Unplash

Installation

  1. Register you developer account for Unsplash API

  2. Create a new app on Unsplash

  3. Go to the Keys section of your app's page and copy your keys into a new file.

const UnsplashKeys = {
  accessKey: 'MgllgRq7xd3TYgttzB1esqxfnFvC90sn9HLbUTRWclw',
  secretKey: 'E0BCAZUBPNQqc0UvpCxkOuHDNbSzAaxXqscX-kSHxks',
};
 
export default UnsplashKeys;

Remeber to keep this file in local

  1. Install this package
yarn add react-native-unsplash

Basic Usage

import UnsplashSearch, { UnsplashPhoto } from 'react-native-unsplash';
 
onOnlinePhotoSelect(photoUnsplashPhoto) {
    console.log(photo.urls.regular)
}
 
render() {
  return <UnsplashSearch
    accessKey={...} 
    onPhotoSelect={this.onOnlinePhotoSelect
  />;
}

Package Sidebar

Install

npm i react-native-unsplash

Weekly Downloads

2

Version

0.0.9

License

MIT

Unpacked Size

543 kB

Total Files

63

Last publish

Collaborators

  • newbiebr