react-native-ui-stepper
react-native-ui-stepper copied to clipboard
Should react-native-ui-stepper move to Render Props?
Hey 👋
I wasn't quite sure where to put this but it's the only place I know where to reach out to Users.
I am thinking of rewriting the react-native-ui-stepper library so that it utilises the concepts of Render Props.
Please 👍 or 👎 to let me know if you're for or against this change.
What does this mean?
- A newly written API that will deprecate previous versions.
- (More importantly) You will have complete control of what components you render to display the stepper value. You will be responsible for providing styles.
- There will be an out-of-the-box component that'll
How might the new API look?
import UIStepper from 'react-native-ui-stepper';
const App = () => (
<UIStepper
render={(value, onIncrement, onDecrement) => {
<MyCustomStepper
value={value}
onIncrement={onIncrement}
onDecrement={onDecrement}
/>
}}
/>
)
// Your Custom Component
const MyCustomStepper = ({ value, onIncrement, onDecrement }) => (
<Text>{value}</Text>
)
I'll leave this open as I would like to gather a general consensus before committing to a rewrite. It will automatically be closed off on 7th May 2018
Thanks.
Hi @hannigand ,
I know I'm a bit late but this would be a great update for my use case. Right now, out of the box I'm facing and issue when displayValue
is true
. The stepper value overflows the container and I'm looking for a way to provide my own. (You can reproduce the issue with a floating point number btw)
Cheers