[PR #210] [MERGED] Use useEffectEvent in React hooks #1156

Closed
opened 2026-03-14 09:21:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/210
Author: @remorses
Created: 10/10/2025
Status: Merged
Merged: 10/12/2025
Merged by: @kommander

Base: mainHead: more-useevent


📝 Commits (2)

  • 2ed4935 Use useEffectEvent in useOnResize and rename useEvent to useEffectEvent
  • 54bbadb Merge branch 'main' into more-useevent

📊 Changes

3 files changed (+9 additions, -7 deletions)

View changed files

📝 packages/react/src/hooks/use-event.ts (+1 -1)
📝 packages/react/src/hooks/use-keyboard.ts (+3 -3)
📝 packages/react/src/hooks/use-resize.ts (+5 -3)

📄 Description

Summary

  • Renamed useEvent to useEffectEvent (matches React RFC naming)
  • Applied useEffectEvent to useOnResize hook to prevent unnecessary effect re-runs when callback references change

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/210 **Author:** [@remorses](https://github.com/remorses) **Created:** 10/10/2025 **Status:** ✅ Merged **Merged:** 10/12/2025 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `more-useevent` --- ### 📝 Commits (2) - [`2ed4935`](https://github.com/anomalyco/opentui/commit/2ed49358563e4d85744d567823c78acba115529c) Use useEffectEvent in useOnResize and rename useEvent to useEffectEvent - [`54bbadb`](https://github.com/anomalyco/opentui/commit/54bbadbcd0400819b39e796a92ed1da66aaa5990) Merge branch 'main' into more-useevent ### 📊 Changes **3 files changed** (+9 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/react/src/hooks/use-event.ts` (+1 -1) 📝 `packages/react/src/hooks/use-keyboard.ts` (+3 -3) 📝 `packages/react/src/hooks/use-resize.ts` (+5 -3) </details> ### 📄 Description ## Summary - Renamed `useEvent` to `useEffectEvent` (matches React RFC naming) - Applied `useEffectEvent` to `useOnResize` hook to prevent unnecessary effect re-runs when callback references change --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:21:19 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1156
No description provided.