Skip to content

class-style "this.handleImagePicked" and undeclared function/variable assignments in with-aws-storage-upload #627

@AnupamKhosla

Description

@AnupamKhosla

https://github.com/expo/examples/blob/master/with-aws-storage-upload/App.js

Could someone explain if this code was supposed to be for class based components or something? I am getting errors for property not existing:

handleImagePicked = async (pickerResult) = -- Link to line 53

uploadImage = (filename, img) => {

Why aren't they defined with const or let or var like const uploadImage = (filename, img) => {...? Also why do we have this.handleImagePicked(result); inside takePhoto and pick pickPhoto functions?

I haven't yet connected with amazon aws. I actually want to use Firebase instead. I don't think handleImagePicked and others are coming as global variables from some import.

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