react-native-paper icon indicating copy to clipboard operation
react-native-paper copied to clipboard

Warning: TextInput.Icon: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Open Volper212 opened this issue 1 year ago • 5 comments

Current behaviour

Warning: TextInput.Icon: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Expected behaviour

No warning :)

How to reproduce?

Use TextInput.Icon, I used it with the props icon and onPress set. I use React 18.3.1.

What have you tried so far?

There are no defaultProps in my code, but I found them in react-native-paper in the file src/components/TextInput/Adornment/TextInputIcon.tsx (line 179).

Your Environment

software version
android 14
react 18.3.1
react-native 0.74.1
react-native-paper 5.12.3
node 20.14.0
npm or yarn 9.5.1

Volper212 avatar Jun 07 '24 16:06 Volper212

@Volper212 Hi I have fixed this issue, and raised Pull request

PR - #4429

@raajnadar

Vimal1464 avatar Jun 09 '24 12:06 Vimal1464

https://github.com/callstack/react-native-paper/issues/4382

zkteco-home avatar Jun 09 '24 23:06 zkteco-home

Fixed by my PR #4385, due to be included in 5.12.4

timbocole avatar Jun 12 '24 07:06 timbocole

Fixed by my PR #4385, due to be included in 5.12.4

When will that be released?

bnbon avatar Jul 08 '24 00:07 bnbon

Fixed by my PR #4385, due to be included in 5.12.4

When will that be released?

Hopefully soon 🤞, see: https://github.com/callstack/react-native-paper/pull/4385#issuecomment-2203447855

timbocole avatar Jul 08 '24 07:07 timbocole