callstack / callstack/react-native-paper
Native implementation of TouchableRipple doesn't support children and style as functions
- 主要语言
- TypeScript
- 星标
- 14.5k
- 派生
- 2.2k
- 平均合并
- 5 天 23 小时
- 30 天内合并 PR
- 12
描述
### Current behaviour
Native version of `TouchableRipple` doesn't support `children` and `style` props as functions.
It fails with an exception: "React.Children.only expected to receive a single React element child."
But the web version supports both.
And [documentation](https://oss.callstack.com/react-native-paper/docs/components/TouchableRipple/#children-required) says it should support it.
It seems the split in behaviour between native and web happened after this PR: https://github.com/callstack/react-native-paper/pull/3909
### Expected behaviour
It should behave the same as the web version and as described in the documentation.
### How to reproduce?
https://snack.expo.dev/@rosko/touchableripple-children-style
贡献指南
调研方向
从原生 TouchableRipple 实现开始,并将其与 Web 版本进行比较,重点关注 issue 中描述的 children 和 style props。使用链接的 Expo Snack 复现异常,并查看 PR #3909 以了解行为拆分。当 native 和 web 都能一致地支持这两个 props,且不再出现报告中的错误时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native, typescript
- 领域
- frontend, mobile
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100