oliviertassinari / react-swipeable-views

A React component for swipeable views. :snowflake:
https://react-swipeable-views.com/
MIT License
4.46k stars 479 forks source link

SwipeableViews rerender too much #666

Open jdk-creator opened 2 years ago

jdk-creator commented 2 years ago

Expected Behavior

I have an input and a swipeableview and I expect if the value input is modified then only the input is re-rendered.

Current Behavior

Now each time I change the value of the input the swipeableview re-render too

Steps to Reproduce (for bugs)

https://codesandbox.io/s/crazy-lake-0ql8rs?file=/demo.js:624-638

  1. enter a value in the put
  2. You should see in the console that the function callMe is called each time you change the input value

Context

in my real code I do have a heavy component under the swipeableview that cannot just re-render each time I change the input

Your Environment

Tech Version
react-swipeable-views 0.14.0
React 18
platform Windows Browser
etc