-
Notifications
You must be signed in to change notification settings - Fork 418
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
fix: call dynamic hooks in a way that can be compiled #6814
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
No changes to documentation |
cc98a49
to
b20a4af
Compare
Component Testing Report Updated May 31, 2024 2:27 PM (UTC)
|
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.
Great! Looks like there's some unit tests/snapshots that needs updating though
b20a4af
to
99a792f
Compare
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
@SocketSecurity ignore-all |
99a792f
to
d33310d
Compare
@SocketSecurity ignore-all |
Description
Refactors
FieldAction
andInspectorMenuItem
components so they're no longer calling hooks that come from props. Instead, the components themselves are dynamically defined, allowing React to call said underlying hooks in a dynamic way.It upholds the guarantee that no matter how many times, say,
FieldAction
re-renders, it'll never suddenly seeprops.action.useAction()
change identity, because if it changes a new component is created instead.What to review
It should make sense. There's another linter warning in
DocumentInspectorMenuItemsResolver.tsx
that will be handled in a follow up.Testing
Existing tests should be enough.
Notes for release
N/A