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: import React, {memo,forwardRef} from 'react';
export default memo(forwardRef(({ foo = 'bar' }, ref) => <div ref={ref}>{foo}</div>));This does work: import React, {memo,forwardRef} from 'react';
export default React.memo(forwardRef(({ foo = 'bar' }, ref) => <div ref={ref}>{foo}</div>));So does this: import React, {memo,forwardRef} from 'react';
export default memo(({ foo = 'bar' }, ref) => <div ref={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
0f3ba92
Compare
|
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.