You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Card component clones its children and injects additional props (index, total, siblings, borderRadiusStyles). This leads to runtime errors when a child is a React.Fragment, which only accepts key and children props. Other components that do not expect these props may also be affected.
Expected behaviour
The Card component should render React.Fragment children without throwing runtime errors by avoiding invalid prop injection.
Current behaviour
The Card component clones its children and injects additional props (index, total, siblings, borderRadiusStyles). This leads to runtime errors when a child is a React.Fragment, which only accepts key and children props. Other components that do not expect these props may also be affected.
Expected behaviour
The Card component should render React.Fragment children without throwing runtime errors by avoiding invalid prop injection.
How to reproduce?
Pass a React.Fragment as a child of Card.
What have you tried so far?
Relevant source line: https://github.com/callstack/react-native-paper/blob/main/src/components/Card/Card.tsx#L278
Potential fix:
The text was updated successfully, but these errors were encountered: