We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React version: ^18.0.0
useRef
Link to code example: https://codesandbox.io/p/sandbox/funny-sid-pm6xzq?file=%2Fsrc%2FApp.js%3A12%2C41
The current property is deleted, and a new property is added when trying to add it to the ref Object
ref Object is sealed, so we should only be allowed to change its current value but not being able to delete it or add a new property to the object.
both createRef and useRef are sealed but only the ref object returned from createRef is selaed:
createRef
useRef:mountRef : link
createRef: Link
The text was updated successfully, but these errors were encountered:
No branches or pull requests
React version: ^18.0.0
Steps To Reproduce
useRef
.Link to code example: https://codesandbox.io/p/sandbox/funny-sid-pm6xzq?file=%2Fsrc%2FApp.js%3A12%2C41
The current behavior
The current property is deleted, and a new property is added when trying to add it to the ref Object
The expected behavior
ref Object is sealed, so we should only be allowed to change its current value but not being able to delete it or add a new property to the object.
both
createRef
anduseRef
are sealed but only the ref object returned fromcreateRef
is selaed:useRef:mountRef : link
createRef: Link
The text was updated successfully, but these errors were encountered: