hhunaid / react-native-image-crop-tools

Native-ish Image Crop Tools for react native
171 stars 58 forks source link

how to set onImageCrop Response to another state object? #65

Open SriSamVictor opened 2 years ago

SriSamVictor commented 2 years ago

I got cropped response object in onImageCrop but i can't set the object to another state object?

shahanshah87 commented 2 years ago

@SriSamVictor are you getting cropped response object in Android because I am getting response in Android, its working fine in iOS.

If you are getting response then you can do something like this:- onImageCrop={(res) => this.setState({uri:res.uri,width:res.width,height:res.height}} or you can use callback function if you are using Cropper as a child component.