Skip to content

Compiler doesn't work with ref forwarding #1569

@AnthonyRonning

Description

@AnthonyRonning

Tried using it, breaks my app, here's the logs if you're curious:

hunk-RPCDYKBN.js?v=9e6f328c:521 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 `UnifiedChat`.                                                                                                                                                                                                         
       at LingoAttributeComponent2 (http://localhost:5173/node_modules/.vite/deps/lingo__dev_react_client.js?v=9e6f328c:5959:11)                                                                                                                     
       at div                                                                                                                                                                                                                                        
       at div                                                                                                                                                                                                                                        
       at form                                                                                                                                                                                                                                       
       at div                                                                                                                                                                                                                                        
       at div                                                                                                                                                                                                                                        
       at div                                                                                                                                                                                                                                        
       at div                                                                                                                                                                                                                                        
       at div                                                                                                                                                                                                                                        
       at UnifiedChat (http://localhost:5173/src/components/UnifiedChat.tsx:617:20)                                                                                                                                                                  
       at Index (http://localhost:5173/src/routes/index.tsx?t=1762893091865:45:20)                                                                                                                                                                   
       at MatchInnerImpl (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:2781:3)                                                                                                                                 
       at SafeFragment (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:2446:87)                                                                                                                                  
       at CatchBoundaryImpl (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:1552:5)                                                                                                                              
       at CatchBoundary (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:1532:32)                                                                                                                                 
       at SafeFragment (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:2446:87)                                                                                                                                  
       at MatchImpl (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:2687:3)
       at Suspense
       at OutletImpl (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:2863:18)
       at Root (http://localhost:5173/src/routes/__root.tsx:37:7)
       at MatchInnerImpl (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:2781:3)
       at SafeFragment (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:2446:87)
       at CatchBoundaryImpl (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:1552:5)
       at CatchBoundary (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:1532:32)
       at SafeFragment (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:2446:87)
       at MatchImpl (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:2687:3)
       at CatchBoundaryImpl (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:1552:5)
       at CatchBoundary (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:1532:32)
       at MatchesInner (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:3427:19)
       at Suspense
       at Matches (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:3417:18)
       at RouterContextProvider (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:5196:3)
       at RouterProvider (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-router.js?v=9e6f328c:5215:27)
       at InnerApp (http://localhost:5173/src/app.tsx?t=1762893091865:44:14)
       at BillingServiceProvider (http://localhost:5173/src/components/BillingServiceProvider.tsx:22:3)
       at Provider (http://localhost:5173/node_modules/.vite/deps/chunk-SS47PFPH.js?v=9e6f328c:38:15)
       at TooltipProvider (http://localhost:5173/node_modules/.vite/deps/@radix-ui_react-tooltip.js?v=9e6f328c:226:5)
       at QueryClientProvider (http://localhost:5173/node_modules/.vite/deps/@tanstack_react-query.js?v=9e6f328c:2844:3)
       at OpenAIProvider (http://localhost:5173/src/ai/OpenAIContext.tsx:22:3)
       at LocalStateProvider (http://localhost:5173/src/state/LocalStateContext.tsx:48:3)
       at Fx (http://localhost:5173/node_modules/.vite/deps/@opensecret_react.js?v=9e6f328c:15762:13)
       at NotificationProvider (http://localhost:5173/src/contexts/NotificationContext.tsx:22:3)
       at App
       at LingoProvider (http://localhost:5173/node_modules/.vite/deps/lingo__dev_react_client.js?v=9e6f328c:5862:14)
       at LingoProviderWrapper (http://localhost:5173/node_modules/.vite/deps/lingo__dev_react_client.js?v=9e6f328c:5874:66)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions