Thursday, January 31, 2019

React native : What is Expo

Expo is a free and open source toolchain built around React Native to help you build native iOS and Android projects using JavaScript and React.
They make the entire process of developing an app and publishing it very easy. You’ll as well have access to the Expo SDK, a library that provides a wide variety of native APIs on iOS and Android, like the Camera API.

Expo gives us access to DocumentPicker and ImagePicker to pick up a document or image from our phone. The code with React Native will be the following for our “PickImageorDocument” Component. An image is a document, that goes without saying, but this is only to show both options.

The “pickDocument” retrieves a document form our phone and the “pickImage” gets a picture form our phone. We set the local state of our component with the uri of the asset.

References:
https://medium.com/@aurelie.lebec/uploading-pictures-and-videos-from-your-phone-in-your-app-with-react-native-expo-cloudinary-and-d3ad4358e81a

No comments:

Post a Comment