Comments (4)
I think it's because this:
onValueChange={(amount) => this.setState({amount: amount})}
Causes React to re-render the UI
from react-native-slider.
This works:
<Slider
value={this.state.amount}
minimumValue={5}
maximumValue={100}
onValueChange={(amount) => this.setState({amount: amount})}
onSlidingComplete={(amount) => this.setState({amount: amount})}
thumbStyle={Styles.sheet.sliderThumb}
minimumTrackTintColor={Styles.colors.offBlackLightest}
maximumTrackTintColor={Styles.colors.offBlackLightest} />
This could be fixed by making the value parameter mandatory if onValueChange or onSlidingComplete are provided with a function (especially if that function calls setState)
from react-native-slider.
+1 on this issue
from react-native-slider.
Thanks for reporting this @lewisbarber, I've just published 0.6.0 on NPM with a fix to this.
from react-native-slider.
Related Issues (20)
- Uncaught TypeError: Cannot read property 'style' of undefined HOT 2
- TypeError: mainStyles.thumbHorizontal is not a function HOT 2
- Border radius for ends of slider but not for 'active' section?
- New maintainer HOT 2
- Typings (for typescript) HOT 2
- Add note styles on track slider HOT 1
- componentWillReceiveProps has been renamed HOT 2
- AnimatedValue: Attempting to set value to undefined HOT 2
- Animated: `useNativeDriver` was not specified.
- thumbs go beyond the track when setting the maximum value to be lower than the current value of the slider HOT 1
- How to Add vibration and sound while sliding (Haptic Feedback) HOT 2
- SUPPORT. I am using createMaterialTopTabNavigator on home page and it consists of 3 parts. I have videos in each part, when I want to go back and forth any of the videos, it navigates to other parts. how can i solve this problem. thanks HOT 1
- Hello, how can I make two thumbs in one slider?
- inputRange must be monotonically non-decreasing 0, NaN iOS
- New lib, new maintainer.
- Fix a warnning for useNativeDriver
- Fix a warning for useNativeDirver
- Fix for react native version 0.69+
- Error when used with latest rn, ViewPropTypes has be deprecated HOT 1
- I am getting below error while I using in my react native app HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-slider.