Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageStore, ImageEditor not in React Native anymore #65

Open
playfulThinking opened this issue Feb 23, 2022 · 3 comments
Open

ImageStore, ImageEditor not in React Native anymore #65

playfulThinking opened this issue Feb 23, 2022 · 3 comments

Comments

@playfulThinking
Copy link

These packages have been moved out of the base distribution.

ImageStore: Deprecated. Use expo-file-system or react-native-fs instead.

ImageEditor: Deprecated. Use one of the community packages instead

@alfonsogarciacaro
Copy link
Member

Could you please have a look @forki?

@forki
Copy link
Contributor

forki commented Feb 24, 2022

@fremontmj could you please send a PR?

@playfulThinking
Copy link
Author

The only reason I know about this is because I have a nascent Expo project and was testing the web version (which uses react-native-web to make a compatibility layer to React in the browser), and got these errors:

/src/fable_modules/Fable.React.Native.3.0.0-alpha001/Fable.ReactNative.fs.js:1874:14
"export 'ImageEditor' was not found in 'react-native-web/dist/index'
  1872 | export function ImageEditor_cropImage(uri, cropData) {
  1873 |     return new Promise(((onSuccess, onError) => {
> 1874 |         void (ImageEditor.cropImage(uri, cropData.data, onSuccess, onError));
       |              ^
  1875 |     }));
  1876 | }
  1877 |
./src/fable_modules/Fable.React.Native.3.0.0-alpha001/Fable.ReactNative.fs.js:1801:14
"export 'ImageStore' was not found in 'react-native-web/dist/index'
  1799 | export function ImageStore_getBase64ForTag(uri) {
  1800 |     return new Promise(((onSuccess, onError) => {
> 1801 |         void (ImageStore.getBase64ForTag(uri, onSuccess, onError));
       |              ^
  1802 |     }));
  1803 | }
  1804 |
./src/fable_modules/Fable.React.Native.3.0.0-alpha001/Fable.ReactNative.fs.js:1807:14
"export 'ImageStore' was not found in 'react-native-web/dist/index'
  1805 | export function ImageStore_addImageFromBase64(imageData) {
  1806 |     return new Promise(((onSuccess, onError) => {
> 1807 |         void (ImageStore.addImageFromBase64(imageData, onSuccess, onError));
       |              ^
  1808 |     }));
  1809 | }

I then looked up those packages and saw they are no longer in the later React Native distributions (they're also not supported by react-native-web).

I would try to make a PR (though I'm a complete noob at these things), but I don't use either of these libraries, so I'd have no way to test it.

I'm sorry I don't think I can be of help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants