React-slick: initial silde will not be displayed when use map()

Created on 15 Mar 2016  路  5Comments  路  Source: akiran/react-slick

initial silde will not be displayed when use map() to creat activtive pic,but press the dots,the second pic will run...

ul tv y tf4 ke rk3l7w04

Most helpful comment

Not working when mapping with component

    const slides = chars.map( (char) => {
      return <MyComponent char={char}/>
    })
    return (
      <Slider {...settings}>
        {slides}
      </Slider>
    );

But it's working when I used just a div

    const slides = chars.map( (char) => {
      return <div>{char}</div>
    })
    return (
      <Slider {...settings}>
        {slides}
      </Slider>
    );

All 5 comments

i had the same question

Not working when mapping with component

    const slides = chars.map( (char) => {
      return <MyComponent char={char}/>
    })
    return (
      <Slider {...settings}>
        {slides}
      </Slider>
    );

But it's working when I used just a div

    const slides = chars.map( (char) => {
      return <div>{char}</div>
    })
    return (
      <Slider {...settings}>
        {slides}
      </Slider>
    );

I've got the same issue.. any ideas?

Nice1, this comment got my slider working...somehow, but whats happening here?

I'm not sure if that's still the case. The issue could have been fixed in previous releases. Please feel free to request reopen if disagree.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darkalor picture darkalor  路  4Comments

briziel picture briziel  路  3Comments

will88 picture will88  路  3Comments

vugman picture vugman  路  3Comments

ramyatrouny picture ramyatrouny  路  3Comments