react-native-slider icon indicating copy to clipboard operation
react-native-slider copied to clipboard

Fix flicker issue on re-render in web implementation of Slider component

Open landabaso opened this issue 1 year ago • 2 comments

Description

This PR addresses an issue with the Slider component where a flicker effect is visible during re-renders, specifically in the web implementation. The flicker was caused by the width being reset during the layout calculation.

Changes Made

  • Modified sliderStyle to set the width only if it is not zero using the conditional spread operator.
    const sliderStyle = { zIndex: 1, ...(width !== 0 && { width }) };
    

landabaso avatar May 21 '24 12:05 landabaso