voronianski / swipe-js-iso

Universal (a.k.a isomorphic) version of Swipe.js
https://www.npmjs.com/package/swipe-js-iso
MIT License
187 stars 57 forks source link

when I using redux ,img is taken from state and map() #19

Closed into-piece closed 6 years ago

into-piece commented 6 years ago
  <ReactSwipe className="carousel" className={style.carousel} swipeOptions={{
                continuous: true,
                auto: 3000,
                callback: function(index, elem) {
                    $(".current").html(index+1)
                }
                }}>
                    {
                        props.detailBanner.map((item,index)=>{
                            return(
                                <div key={index}>
                                    <img src={item}/>
                                </div>
                                )
                        })
                    }
  </ReactSwipe>

There is an error that Cannot show image

into-piece commented 6 years ago

I have solved this problem by using a condition sentence which can Synchronize image in state and your swipe plug-in components