prscX / react-native-number-stepper

ReactNative: Number Stepper
Apache License 2.0
35 stars 3 forks source link

Value doesn't change #5

Open thomashagstrom opened 5 years ago

thomashagstrom commented 5 years ago

When providing a new value dynamically it doesn't change in the stepper.

This is because an anti-pattern is used where you both take the value as prop and keep it as local state (one or the other).

Try fixing this by removing local state.value in your component and only using props.value.