Preact: Stale ref inside component wrapped with forwardRef

Created on 31 Oct 2019  路  1Comment  路  Source: preactjs/preact

This was reported in our slack channel:

Refs inside a component that's wrapped with forwardRef has a stale ref reference, when the inner component is updated. @cristianbote confirmed that this works fine in React.

Repro: https://codesandbox.io/s/agitated-darkness-np7fq

Most helpful comment

For good measure, here's a CodeSandbox showing it works fine in React.

>All comments

For good measure, here's a CodeSandbox showing it works fine in React.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kay-is picture kay-is  路  3Comments

SabirAmeen picture SabirAmeen  路  3Comments

KnisterPeter picture KnisterPeter  路  3Comments

k15a picture k15a  路  3Comments

marcosguti picture marcosguti  路  3Comments