callstack / callstack/react-native-paper

Native implementation of TouchableRipple doesn't support children and style as functions

Open
#4,873 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
14.5k
Forks
2.2k
Avg merge
5d 23h
Merged PRs (30d)
12

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.