callstack / callstack/react-native-slider

Support native events

未关闭
#99 8 条评论 9 个 reaction 已指派 0 人 在 GitHub 查看
feature request
主要语言
TypeScript
星标
1.4k
派生
295
平均合并
5 分钟
30 天内合并 PR
1

描述

## 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

贡献指南

打开贡献指南

调研方向

首先跟踪 issue 中描述的 Android JS 实现,尤其是 Slider 值变化和所列事件的连接方式。将当前的 JavaScript 事件与 React Native 的 native-event 处理进行比较,并确定 Animated.event 应如何接收 Slider 更新。完成标准是三个原生事件能够正常工作,同时不破坏现有的 JavaScript 事件用户。

由索引模型根据 Issue 内容生成。

评估

技术栈
react-native, typescript
领域
mobile
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。