Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextField error on web: "Function components cannot be given refs. [...]" #3087

Open
2 of 7 tasks
MichaelHerrmann1 opened this issue May 23, 2024 · 0 comments
Open
2 of 7 tasks
Labels
bug a bug in one of the components

Comments

@MichaelHerrmann1
Copy link

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

  • Components
  • Demo
  • Docs
  • Typings

Steps to reproduce

Steps to reproduce the behavior:

  1. Use an expo project with current RNUILib v7.22.0
  2. Add <TextField ... />
  3. Start expo dev server and open web
  4. 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
  • Web
@MichaelHerrmann1 MichaelHerrmann1 added the bug a bug in one of the components label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in one of the components
Projects
None yet
Development

No branches or pull requests

1 participant