You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://reactjs.org/docs/test-renderer.html#ideas demonstrates how to use createNodeMock to mock a callback ref. However, this example does not work for refs create with React.createRef(), because they use the current property. Could you extend the documentation please?
The text was updated successfully, but these errors were encountered:
Hi, I am actually not using createNodeMock anymore. Instead, I refactored the tested component to use the useRef hook. That works quite fine. I don't need mocks anymore.
https://reactjs.org/docs/test-renderer.html#ideas demonstrates how to use
createNodeMock
to mock a callback ref. However, this example does not work for refs create withReact.createRef()
, because they use thecurrent
property. Could you extend the documentation please?The text was updated successfully, but these errors were encountered: