react-native-ui-lib
react-native-ui-lib copied to clipboard
TextField error on web: "Function components cannot be given refs. [...]"
Description
Using a TextField produces error on web: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
Related to
- [x] Components
- [ ] Demo
- [ ] Docs
- [ ] Typings
Steps to reproduce
Steps to reproduce the behavior:
- Use an expo project with current RNUILib v7.22.0
- Add <TextField ... />
- Start expo dev server and open web
- See error
More Info
I guess this error was introduced in v7.14.0 with #2874 .
src/components/textField/textInput/index.web.tsx
probably just needs a forwardRef(...)
Environment
- React Native version: 0.74.1
- React Native UI Lib version: 7.22.0
Affected platforms
- [ ] Android
- [ ] iOS
- [x] Web