New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-everywhere-image-picker

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-everywhere-image-picker

An image picker for React Native (mobile) and React (web).

  • 0.1.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Native Everywhere Image Picker

Cross-platform image picker for React/React Native. Built for iOS, Android, and web.

Installation

npm install --save react-native-everywhere-image-picker

Requirements
  1. For web use in create-react-app you MUST have react-scripts version 1.0.8 or over.
example
import React from "react";
import { Text, Image, View } from "react-native";
import ImagePicker from "react-native-everywhere-image-picker";

const style = {
  container: {
    flex: 1,
    alignItems: "center",
    justifyContent: "center"
  },
  image: {
    width: 200,
    height: 200,
    marginTop: 25
  }
};

export default class Example extends React.Component {
  state = { uri: null };

  _handleImage = ({ uri }) => {
    this.setState(() => ({ uri }));
  };

  _handleFail = ({ error }) => {
    console.log(error);
  };

  render() {
    return (
      <View style={style.container}>
        <ImagePicker onComplete={this._handleImage} onFail={this._handleFail}>
          <Text>Pick an image from camera roll</Text>
        </ImagePicker>
        {this.state.uri &&
          <Image source={{ uri: this.state.uri }} style={style.image} />}
      </View>
    );
  }
}

FAQs

Package last updated on 08 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc