Skip to content

ref: remove dep management from useHotkeys#85236

Merged
JonasBa merged 1 commit into
masterfrom
jb/theme/useHotkeys
Feb 14, 2025
Merged

ref: remove dep management from useHotkeys#85236
JonasBa merged 1 commit into
masterfrom
jb/theme/useHotkeys

Conversation

@JonasBa

@JonasBa JonasBa commented Feb 14, 2025

Copy link
Copy Markdown
Contributor

Removing the dep management from useHotkeys as it does not enforce or warn about hook dependencies, making it prone to errors.

I have tried to add this hook to react hook exhaustive deps first as opposed to removing dep (something we do for useMemoWithPrevious for example) , to see if we can get it to properly warn on wrong dependencies, but the linter trips on the inline function callback definition inside the hotkey definition, and wrongly recommends passing a function to this hook (which the signature does not allow for).

@JonasBa JonasBa requested review from a team as code owners February 14, 2025 15:02
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 14, 2025
@JonasBa JonasBa merged commit 94f19a2 into master Feb 14, 2025
@JonasBa JonasBa deleted the jb/theme/useHotkeys branch February 14, 2025 16:28
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants