Skip to content

feat(hooks): add useConditionalEffect hook#242

Merged
seungrodotlee merged 7 commits into
toss:mainfrom
froggy1014:feat/add-useConditionalEffect
Jun 9, 2025
Merged

feat(hooks): add useConditionalEffect hook#242
seungrodotlee merged 7 commits into
toss:mainfrom
froggy1014:feat/add-useConditionalEffect

Conversation

@froggy1014
Copy link
Copy Markdown
Contributor

@froggy1014 froggy1014 commented May 22, 2025

Overview

Unlike standard useEffect that executes whenever dependencies change, this hook gives you precise control based on how values change.

Clearer distinction between when to run (condition) and what to run (effect)

Checklist

  • Did you write the test code?
  • Have you run yarn run fix to format and lint the code and docs?
  • Have you run yarn run test:coverage to make sure there is no uncovered line?
  • Did you write the JSDoc?

@froggy1014 froggy1014 changed the title feat: add useConditionalEffect hook feat(hooks): add useConditionalEffect hook May 22, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (402ad9c) to head (fb3a438).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #242   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           36        37    +1     
  Lines         1070      1093   +23     
  Branches       319       324    +5     
=========================================
+ Hits          1070      1093   +23     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/hooks/useConditionalEffect/useConditionalEffect.ts Outdated
Comment thread src/hooks/useConditionalEffect/useConditionalEffect.spec.ts Outdated
Comment thread src/hooks/useConditionalEffect/useConditionalEffect.spec.ts Outdated
Comment thread src/hooks/useConditionalEffect/useConditionalEffect.spec.ts Outdated
Comment thread src/hooks/useConditionalEffect/useConditionalEffect.spec.ts Outdated
Comment thread src/hooks/useConditionalEffect/useConditionalEffect.spec.ts Outdated
Copy link
Copy Markdown
Contributor

@seungrodotlee seungrodotlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

@seungrodotlee seungrodotlee merged commit e45c5a7 into toss:main Jun 9, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants