Skip to content

What is my error? TypeError: null is not an objectΒ #22

@ved08

Description

@ved08

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions