React-native-image-crop-picker: question: how to show a photo correctly

Created on 7 Jun 2017  路  1Comment  路  Source: ivpusic/react-native-image-crop-picker

Version

  • react-native-image-crop-picker v0.13.1
  • react-native v0.44.2

Platform

  • iOS

Expected behavior

Sorry to bother you, but how to show a photo correctly after choosing it?
I guess it is \ Everything works like charm except the error shows when require the image:

Error: Unknown named module: '/Users//Library/Developer/CoreSimulator/Devices/CC1CF2B6-289F-44D6-9186-86B96F299049/data/Containers/Data/Application/66E21296-E77B-4D76-89B5-631FDF4614F1/tmp/react-native-image-crop-picker/8F5F5C62-E1AB-4C8B-86F8-2E11F0E39B14.jpg'*

...
    ImagePicker.openPicker({
      width: 300,
      height: 400,
      cropping: true
    })
      .then(image => {
        this.setState({ image: image });
      })
...
    render(){
      return(
        <Image source={require(this.state.image.path)} />;
      )
    }

Did I figure it wrong?

Most helpful comment

dont require it, provide object with {uri} to source instead

>All comments

dont require it, provide object with {uri} to source instead

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Phenek picture Phenek  路  3Comments

zhangjunhou picture zhangjunhou  路  3Comments

phantom1299 picture phantom1299  路  3Comments

co-de picture co-de  路  3Comments

victorwpbastos picture victorwpbastos  路  3Comments