This is my code:
import ImgToBase64 from 'react-native-image-base64';
sendData = async (uri) => {
ImgToBase64.getBase64String(uri)
.then(base64String => {
console.log(base64String)
})
.catch(err => console.log("Error Occured", err));
}
someFunction = async () => {
...function content...
this.sendData(result.uri) //here result.uri is the path to that image i.e file://...
}
With this, I am getting an error saying "TypeError: null is not an object".
Please solve my error
Thanks!