Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'array' of undefined #1

Open
kkotkkio opened this issue Jan 22, 2018 · 1 comment
Open

Cannot read property 'array' of undefined #1

kkotkkio opened this issue Jan 22, 2018 · 1 comment

Comments

@kkotkkio
Copy link

kkotkkio commented Jan 22, 2018

This component is great for me so I do want to use this.

But when I import this, I've got a error below like.

Cannot read property 'array' of undefined

I just importing like below
import ImageSlider from 'react-native-elastic-image-slider';

I didn't other codes.

What's wrong?

Needs help.

Thank you.

--

My spec.

{
  "main": "node_modules/expo/AppEntry.js",
  "private": true,
  "scripts": {
    "test": "node ./node_modules/jest/bin/jest.js --watch"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/samples": "2.1.1",
    "expo": "^24.0.0",
    "react": "16.0.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-24.0.0.tar.gz",
    "react-native-elastic-image-slider": "^1.0.0",
    "react-native-gifted-chat": "^0.3.0",
    "react-native-image-zoom-viewer": "^2.0.18",
    "react-native-responsive-grid": "^0.40.6",
    "react-native-scalable-image": "^0.2.2",
    "react-native-scrollable-tab-view": "^0.8.0",
    "react-navigation": "^1.0.0-beta.21"
  },
  "devDependencies": {
    "jest-expo": "^24.0.0"
  }
}

@xiewang
Copy link
Owner

xiewang commented Jan 22, 2018

@kkotkkio you need a array of photos to init ImageSlider, you can refer to the sample https://github.com/ShareTechChina/DSJAPP/blob/48b32ab27069977325f6a8ec4cc00921559dd68b/app/pages/note/PhotosReviewPage.js#L131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants