-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
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
useFocusableIframe: Refactor to TypeScript #45428
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
Size Change: -4 B (0%) Total Size: 1.28 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you! 🚀
packages/compose/README.md
Outdated
@@ -326,7 +326,7 @@ Dispatches a bubbling focus event when the iframe receives focus. Use | |||
|
|||
_Returns_ | |||
|
|||
- `Object`: Ref to pass to the iframe. | |||
- Ref to pass to the iframe. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: would it make more sense to swap Object
with RefCallback
, instead of just removing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. Since the docs are autogenerated I added a return type in 266fdc5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thank you!
What?
Refactor
useFocusableIframe
to TypeScript.Why?
The return type was wrong and by refactoring it to TypeScript we can rely on the return type of the function istead of JSDocs.
How
Testing Instructions
Run
npm run dev
and make sure no TypeScript errors occurs.