Uh oh!
There was an error while loading. Please reload this page.
Support 'memo(forwardRef(...' - #592
Conversation
Thanks for contributing. Could you show me an example of what is not working? When I use the example from the test and enter it into the playground I already get the same result as in the test. |
What I see in playground, and in our case also is that this does not work in playground: importReact,{memo,forwardRef}from'react';exportdefaultmemo(forwardRef(({ foo ='bar'},ref)=><divref={ref}>{foo}</div>));This does work: importReact,{memo,forwardRef}from'react';exportdefaultReact.memo(forwardRef(({ foo ='bar'},ref)=><divref={ref}>{foo}</div>));So does this: importReact,{memo,forwardRef}from'react';exportdefaultmemo(({ foo ='bar'},ref)=><divref={ref}>{foo}</div>);I've update the test code in the PR, it still pass, but I'm not sure if this is the proper way of fixing the issue or there is a simpler fix. |
86211ec to
0f3ba92Comparedanez
commented
Jun 13, 2022
Thanks again. I looked into this more and discovered that the underlying issue is that |
Co-authored-by: Daniel Tschinder <231804+danez@users.noreply.github.com>
Co-authored-by: Daniel Tschinder <231804+danez@users.noreply.github.com>
While
forwardRef(...)is already supportedmemo(forwardRef(...))doesn't.