question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Undefined is not an object data.length

See original GitHub issue

Undefined is not an object data.length

i am using default one

<Carousel layout={‘stack’} layoutCardOffset={18} />

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
valeriashpinercommented, Nov 29, 2018

@rohit280 you need to add line data={this.state.product} to your Carousel tag. screen shot 2018-11-29 at 5 11 08 pm

0reactions
rohit280commented, Oct 1, 2018

<Carousel ref={(carousel) => { this._carousel = carousel; }}

          onSnapToItem={(index) => this.setState({ activeSlide: index }) }
          enableSnap={true}
        >
            {this.renderImages()}
        </Carousel>
        <Pagination
          dotsLength={this.state.product.images.length}
          activeDotIndex={this.state.activeSlide}
          containerStyle={{ backgroundColor: 'transparent',paddingTop: 0, paddingBottom: 0, marginTop: -15 }}
          dotStyle={{
              width: 10,
              height: 10,
              borderRadius: 5,
              marginHorizontal: 2,
              backgroundColor: 'rgba(255, 255, 255, 0.92)'
          }}
          inactiveDotOpacity={0.4}
          inactiveDotScale={0.6}
        />

someone help me to solve this issue…

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - undefined is not an object (evaluating 'data.length')
So I added 'react-native-app-intro-slider' module. Then I got the following error. undefined is not an object (evaluating 'data.length'). That ...
Read more >
undefined is not an object (evaluating 'data.length') #1 - GitHub
In Android im getting the error mentioned in title data. length is not defined?
Read more >
undefined is not an object (evaluating 'dataText[i].length')
When trying to make a type-writer work, I get TypeError: undefined is not an object (evaluating 'dataText[i].length') on: if (i < dataText[i].length) ...
Read more >
LWC - TypeError: undefined is not an object (evaluating 'e ...
When you write to this.value you are assigning that value an array. this.value = e.detail.value; this.userConditionsLWC1 = []; this.
Read more >
Undefined is not an object (evaluating 'data.length')
An odd error I got… and the worst part is that none of my scripts have anything called “data.length”…
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found