Skip to content

Conversation

@nakjun12
Copy link
Contributor

@nakjun12 nakjun12 commented Jan 31, 2024

Overview

This PR adds tests for the usePreservedCallback hook:

  1. Checks if the hook returns updated values after state changes.
  2. Ensures the callback reference is constant after state updates.
  3. Verifies that arguments are correctly passed to the callback.

[ AS-IS ]

[ TO-BE ]
image

PR Checklist

  • I read and included theses actions below
  1. I have read the Contributing Guide
  2. I have written documents and tests, if needed.

@netlify
Copy link

netlify bot commented Jan 31, 2024

👷 Deploy request for slash-libraries pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 45bddab

@nakjun12 nakjun12 changed the title test(@toss/react): .Add usePreservedCallback test code test(@toss/react): Add usePreservedCallback test code Jan 31, 2024
Copy link
Member

@okinawaa okinawaa left a comment

Choose a reason for hiding this comment

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

Cool 😎

@okinawaa okinawaa merged commit 5cfc7bc into toss:main Feb 3, 2024
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.

2 participants