Skip to content

Cannot read property of 'getPhotos' of underfined #106

@73R3WY

Description

@73R3WY

"dependencies": {
"@react-native-community/cameraroll": "^1.3.0",
...,
"react-native-camera-roll-picker": "2.0.0",
...,
}

Using react 16.9.0
Using react-native Expo SDK 36

Referencing:

Having a console log before

    CameraRoll.getPhotos(fetchParams)
      .then(data => this.appendImages(data), e => console.log(e));

will show that CameraRoll is not undefined.

My view definition is something like this:

      <TouchableOpacity
        style={[styles.container, this.props.containerStyle]}
        onPress={this.onActionsPress}
      >
        <Modal
          animationType={"slide"}
          transparent={false}
          visible={this.state.modalVisible}
          onRequestClose={() => {
            this.setModalVisible(false);
          }}
        >
          {this.renderNavBar()}
          <CameraRollPicker
            maximum={10}
            imagesPerRow={4}
            callback={this.selectImages}
            selected={[]}
          />
        </Modal>
        {this.renderIcon()}
      </TouchableOpacity>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions