jechav / tiny-slider-react

wrapper of tiny-slider plugin for react.
https://tiny-slider-react-tests.netlify.app/
47 stars 27 forks source link

Doesn't destroy and rebuild properly #13

Closed BennyCarlsson closed 4 years ago

BennyCarlsson commented 4 years ago

On unmount the slider doesn't get destroyed proberly.

I have a component using the slider. It get images as props. When the image props changes the component rerender. The slider tries to destroy() and rebuild() however slider state is not properly destroyed and the slider ends up with old and new images.

Will try to extract the component to show of a minimum example.

BennyCarlsson commented 4 years ago

Created minimum project to reproduce the bug https://codesandbox.io/s/tiny-slider-bug-qji0w

ferblacklion commented 4 years ago

Try

On unmount the slider doesn't get destroyed proberly.

I have a component using the slider. It get images as props. When the image props changes the component rerender. The slider tries to destroy() and rebuild() however slider state is not properly destroyed and the slider ends up with old and new images.

Will try to extract the component to show of a minimum example.

Hello try to use this package is a fork https://github.com/ferblacklion/tiny-slider-react

jechav commented 4 years ago

fixed v0.5.2

EgorKluch commented 4 years ago

v0.5.3 - issue reproduced.

care4pet commented 4 years ago

Yep, still the same.