feat(jsx): add useUnmount and useUpdateEffect hooks#628
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughTwo lifecycle hooks are added to the jsx package: ChangesLifecycle Hooks for JSX
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
There was a problem hiding this comment.
🎉 Thanks for your first PR to TermUI, @DarkSorcerer14.
Before your PR merges:
- ⭐ Star the repo. Required. The
star-checkjob blocks your merge otherwise. - ✅ All checks green:
build,test,typecheck. - 🏷 PR title follows
type: short description. Example:fix: handle empty list. - 🔗 Link your closing issue in the description.
GSSoC 2026 points come from labels after merge:
gssoc:approved. +50 base points.level:beginner/intermediate/advanced/critical. +20 / +35 / +55 / +80.quality:clean/exceptional. x 1.2 / x 1.5.type:*. Stackable bonus.
Your reviewer responds within 48 hours. Ping @Karanjot786 on Discord for urgent help.
🚀 Welcome to the cohort.
|
Hi @Karanjot786 ! I've successfully implemented and fully verified |
|
i'd like to work on this issue under gssoc 2026. please assign this to me |
Description
This PR implements the custom React-like lifecycle hook
useUpdateEffectfor the@termuijs/jsxpackage. It functions like standarduseEffectbut explicitly skips execution on initial render using a trackinguseRef.(Note: This PR originally included the implementation for #442 as well, but since #442 was prematurely closed via an unassigned PR, this now serves as the official completion for #443).
Related Issues
Closes #443
Verification Results
bun vitest runsuccessfully with full unit test coverage.bun run typecheckacross all monorepo scopes.Summary by CodeRabbit
New Features
useUnmounthook for executing cleanup callbacks when components unmountuseUpdateEffecthook for running side effects on updates while skipping the initial renderTests