()
| 90 | }); |
| 91 | |
| 92 | const Example = () => { |
| 93 | const outerRef = React.useRef(); |
| 94 | |
| 95 | /** |
| 96 | * Order of the following should not matter. So, even though the first |
| 97 | * component has a "Bar" placeholder, both will end up having the same |
| 98 | * placeholder text "Foo" because `outerRef` was forwarded to |
| 99 | * `LeaderTextField` and got updated by `useObjectRef` before |
| 100 | * `FollowerTextField` executed its `useEffect`. |
| 101 | */ |
| 102 | return ( |
| 103 | <> |
| 104 | <FollowerTextField placeholder="Bar" ref={outerRef} /> |
| 105 | <LeaderTextField placeholder="Foo" ref={outerRef} /> |
| 106 | </> |
| 107 | ); |
| 108 | }; |
| 109 | |
| 110 | render(<Example />); |
| 111 |
nothing calls this directly
no outgoing calls
no test coverage detected