bamlab / react-native-image-resizer

🗻 Resize local images with React Native
MIT License
1.6k stars 342 forks source link

No default module and not-optional options in README #329

Closed kueda closed 1 year ago

kueda commented 1 year ago

As far as I can tell the example code in the README does not work in 3.0.0 for two reasons:

  1. import ImageResizer from '@bam.tech/react-native-image-resizer'; does not return an object with a createResizedImage attribute. Following the example app, you need to do import { createResizedImage } from '@bam.tech/react-native-image-resizer';
  2. The options argument for createResizedImage does not seem to be optional anymore, so the fact that the README code omits it results in a crash.

I was going to just fix the documentation, but I wasn't really sure if these were bugs or intended changes in the functionality.

taboulot commented 1 year ago

@kueda

Thank you for your feedback.

For point 1, I have created this PR #330. Thank you for catching it.

For point 2, I will come back to you later with a proper response.

taboulot commented 1 year ago

@kueda

For the second point, it's a mistake on my side. Indeed, this parameter was optional before (with default value). The PR above will fix it ⬆️

Thank you again for your feedback.

taboulot commented 1 year ago

Fixes have been deployed on version 3.0.1.