usehooks-ts icon indicating copy to clipboard operation
usehooks-ts copied to clipboard

add useDetectChanges hook

Open Hasan-Mir opened this issue 1 year ago • 2 comments

In one of my projects, I had a slow and heavy component that used React.memo(), but it still re-rendered when its parent component re-rendered. I wanted to find out which prop was causing my pure component to re-render, so I used this logic. I thought it might be a good idea to extract it into a custom hook and add it to the usehooks-ts package.

I followed the instructions for contributing, and the files were generated (I think). The tests passed, but in the last step, when I executed pnpm build, it gave me this error at the end:

Screenshot 2023-07-11 142545

However, I committed my changes and pushed them. Excited to contribute to the usehooks-ts project and I hope that my custom hook will be a useful addition to the package. Thank you for considering my pull request.

Hasan-Mir avatar Jul 11 '23 11:07 Hasan-Mir

Someone is attempting to deploy a commit to a Personal Account owned by @juliencrn on Vercel.

@juliencrn first needs to authorize it.

vercel[bot] avatar Jul 11 '23 11:07 vercel[bot]

⚠️ No Changeset found

Latest commit: 364d7dc3cc63e29d6fe32456f8b966d48db712a3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jul 11 '23 11:07 changeset-bot[bot]