prscX / react-native-photo-editor

React Native: Native Photo Editor
Apache License 2.0
1.12k stars 241 forks source link

null is not an object(evaluating RNphotoeditor.Edit) #144

Open 16ntu1120 opened 3 years ago

16ntu1120 commented 3 years ago

This is my code I'm having this issue and have no solution of this kindly help me with this.
const editor = () => { RNPhotoEditor.Edit({ --->issue is in this Edit function
path: RNFS.DocumentDirectoryPath + '/photo.jpg', stickers: [ 'sticker0', 'sticker1', 'sticker2', 'sticker3', 'sticker4', 'sticker5', 'sticker6', 'sticker7', 'sticker8', 'sticker9', 'sticker10', ], colors: undefined, onDone: () => { console.log('on done'); }, onCancel: () => { console.log('on cancel'); }, }); }

Dheeeraj commented 3 years ago

@16ntu1120
Use it this way instead of RNPhotoEditor

import PhotoEditor from 'react-native-photo-editor';

PhotoEditor.Edit(options)