React-slick: how to render Slider in map function ?

Created on 11 Mar 2020  路  2Comments  路  Source: akiran/react-slick

  {this.props.data.map((list, index) => {
          return(
            <div key={index} style={{position:'relative'}} >
              <Line title={list.title} link={list.link !== null ? list.link : ''} />
              <Slider {...settings}/>
            </div>
          );
        })}

but first slider working

All 2 comments

亘夭丕乇卮 鬲賵 賲倬 乇賳丿乇 賲蹖卮賴

Can you elaborate? You want to map multiple sliders or multiple results in a single slider?

My example for the latter is:

  <Slider {...settings}>
          {movies.map((element, i) => (
            <div>
              <MovieThumb
                key={i}
                clickable={true}
                image={
                  element.poster_path
                    ? `${IMAGE_BASE_URL}${POSTER_SIZE}${element.poster_path}`
                    : "./images/no_image.jpg"
                }
                movieId={element.id}
                movieName={element.original_title}
              />
            </div>
          ))}
        </Slider>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

rohitgoyal7 picture rohitgoyal7  路  3Comments

jfamousket picture jfamousket  路  3Comments

amishPro picture amishPro  路  3Comments

BradyEdgar94 picture BradyEdgar94  路  3Comments

artemidas picture artemidas  路  4Comments