mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #118] [MERGED] More efficient useKeyboard #1085
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1085
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/118
Author: @remorses
Created: 8/31/2025
Status: ✅ Merged
Merged: 8/31/2025
Merged by: @msmps
Base:
main← Head:use-keyboard-event📝 Commits (2)
0281145do not bind handlers on every render22a99eccopilot is annoying📊 Changes
2 files changed (+27 additions, -3 deletions)
View changed files
➕
packages/react/src/hooks/use-event.tsx(+22 -0)📝
packages/react/src/hooks/use-keyboard.tsx(+5 -3)📄 Description
I added useEvent which let you create a stable function that always uses the latest version
This way there is no need to pass handler to the useEffect dependencies (which would usually be different on every render)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.