callstack / callstack/react-native-slider

Support native events

Open
#99 8 comments 9 reactions 0 assignees View on GitHub
feature request
Dominant language
TypeScript
Stars
1.4k
Forks
295
Avg merge
5m
Merged PRs (30d)
1

Description

## Describe the Feature

**Native Events** instead of ~js events~:
`onValueChange`
`onSlidingStart`
`onSlidingComplete`

## Possible Implementations

Supporting **native events** will unlock the abilities of `Animated.event` enabling tracking the Slider's value and animating stuff accordingly.
This will enable customizing this view to a large extent easily and with high performance.

Avoiding breaking changes can be achieved with a flag from props or by checking `typeof props.onValueChange === 'object'`

.
### Android JS Impl
Uses `Slider` for `value` and renders the rest on top.
Native events will enhance this extremely and make *dev experience* easier (less code needed for customization)

![Color Slider](https://user-images.githubusercontent.com/34343793/63846964-83cbea80-c995-11e9-90d1-e388e9bb3561.gif)

## Related Issues

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Android JS implementation described in the issue, especially how Slider value changes and the listed events are wired. Compare the current JavaScript events with React Native native-event handling and determine how Animated.event should receive the slider updates. Done means the three native events work without breaking existing JavaScript event users.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.