Skip to content

[hooks] fix(useInView): returned element type based on generic#12

Merged
marlonmarcello merged 2 commits into
mainfrom
fix/inview-generic-return
Mar 26, 2024
Merged

[hooks] fix(useInView): returned element type based on generic#12
marlonmarcello merged 2 commits into
mainfrom
fix/inview-generic-return

Conversation

@marlonmarcello
Copy link
Copy Markdown
Member

Description

There is a bug at the moment where if you try to use the hook in a typescript project it expect ONLY an HTMLElement but because that is just a wrapper type you can't pass anything to it.

Solution

Just extend the HTMLElement type.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 26, 2024

🦋 Changeset detected

Latest commit: 5687f5d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wethegit/react-hooks Major

Not sure what this means? Click here to learn what changesets are.

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

@marlonmarcello marlonmarcello requested a review from a team March 26, 2024 22:59
@marlonmarcello marlonmarcello merged commit e0827f6 into main Mar 26, 2024
@marlonmarcello marlonmarcello deleted the fix/inview-generic-return branch March 26, 2024 23:05
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