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

Function components cannot be given refs #1327

Closed
Krabbee opened this issue Feb 5, 2024 · 1 comment
Closed

Function components cannot be given refs #1327

Krabbee opened this issue Feb 5, 2024 · 1 comment

Comments

@Krabbee
Copy link

Krabbee commented Feb 5, 2024

  • What RMWC Version are you using [major.minor.patch]: 14.0.7

  • Name your build system [Webpack, Rollup...]: pnpm with vite

  • Describe the bug with as much detail as possible:

I am getting the following error, but I'm not using any ref(s)

Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Check the render method of `j`.
    at j (http://localhost:3000/node_modules/.vite/deps/chunk-U6EQ7XH4.js?v=03693eb0:1056:15)
    at http://localhost:3000/node_modules/.vite/deps/chunk-U6EQ7XH4.js?v=03693eb0:1120:16
    at div
    at http://localhost:3000/node_modules/.vite/deps/chunk-IBWRNP3F.js?v=03693eb0:561:58
    at Xe (http://localhost:3000/node_modules/.vite/deps/chunk-6KTHFJFM.js?v=03693eb0:5236:13)
    at http://localhost:3000/node_modules/.vite/deps/chunk-6KTHFJFM.js?v=03693eb0:5241:18
    at div
    at div
    at GroupSelector (http://localhost:3000/src/components/GroupSelector/GroupSelector.tsx:22:3)
    at div
    at div
    at Home (http://localhost:3000/src/scenes/Home.tsx?t=1707129704342:32:36)
    at div
    at Nt (http://localhost:3000/node_modules/.vite/deps/@x-act_ui.js?v=272820f1:50776:10)
    at ta (http://localhost:3000/node_modules/.vite/deps/@x-act_ui.js?v=272820f1:50807:13)
    at div
    at div
    at wt (http://localhost:3000/node_modules/.vite/deps/@x-act_ui.js?v=272820f1:51073:12)
    at oa (http://localhost:3000/node_modules/.vite/deps/@x-act_ui.js?v=272820f1:51024:12)
    at LoggedInPage (http://localhost:3000/src/App.tsx?t=1707129704342:60:40)
    at App (http://localhost:3000/src/App.tsx?t=1707129704342:38:3)
    at dl (http://localhost:3000/node_modules/.vite/deps/@x-act_ui.js?v=272820f1:51426:13)
    at X (http://localhost:3000/node_modules/.vite/deps/@x-act_react-utils.js?v=f81ec410:141:11)
    at W (http://localhost:3000/node_modules/.vite/deps/@x-act_react-utils.js?v=f81ec410:30:13)
    at QueryClientProvider (http://localhost:3000/node_modules/.vite/deps/@tanstack_react-query.js?v=22c5fec2:2583:3)
    at Router (http://localhost:3000/node_modules/.vite/deps/chunk-W2K2MWS2.js?v=03693eb0:3925:15)
    at BrowserRouter (http://localhost:3000/node_modules/.vite/deps/chunk-W2K2MWS2.js?v=03693eb0:4660:5)
  • What happened, and what was supposed to happen:
    The error started appearing but unfortunately I don't know when exactly. But I don't think it should ever have been present. I'm suspecting that it is from rmwc somewhere...
@p-98
Copy link
Contributor

p-98 commented Apr 11, 2024

@EmiBemi As you mentioned, this has already been fixed:

https://github.com/rmwc/rmwc/pull/1372/files#diff-f37a37b3d7d9a35bde510dec5925e91640816087541b38928e6604298e2e9fff

@EmiBemi EmiBemi closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants