-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#287 Upgrade next to v15 #289
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…s to latest version
53525bd
to
7458434
Compare
export const useElementVisibility = <T extends Element>({ | ||
element, | ||
export const useElementVisibility = ( | ||
element: HTMLDivElement | null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is an odd type narrowing saying that the only element type accepted would be div
elements or null
. But in theory, it was supposed to accept any valid HTML element or null. I checked the code and played around, and it would take a ref typed as HTMLInputElement
without any squiggly red lines (the project is using typescript 5.3.2), which causes other problems in terms of modifying that hook as the intellisense will display incorrect attributes.
I believe the element being a generic type that extends the correct ParentType
is necessary. The refactoring going down one level i.e. RefObject<T> to Element
does not look like a problem.
I upgraded next to
v15
and react tov19
for theweb
app which resulted in library upgrades in:packages/ui
- upgraded thereact
andtesting-library
versionsapps/workshop
- upgraded thereact
andstorybook
versionsI also tested the app through the docker container and didn't find any issues.