useBreakpoint throws TypeError: queryList.addEventListener is not a function #4962
Closed
4 tasks done
Labels
iOS
An issue or a feature-request for an iOS platform
pending-maintainer-response
Issue is pending response from an Amplify UI maintainer
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
React
Which UI component?
Authenticator
How is your app built?
Vite
What browsers are you seeing the problem on?
Chrome, Safari
Which region are you seeing the problem in?
No response
Please describe your bug.
Using these dependencies:
With this vite configuration:
When running on older iOS devices:
an error
TypeError: queryList.addEventListener is not a function. (In 'queryList.addEventListener("change", handleMediaChange)', 'queryList.addEventListener' is undefined)
is thrown when trying to render<Authenticator>
What's the expected behaviour?
The Authenticator component should support older devices.
Help us reproduce the bug!
Attempt to render the component on any of the following, with Safari or Chrome
Code Snippet
The following snippet is the un-minified compiled JS code of the
useBreakpoint
hook that the Authenticator uses:When I changed the snippet with the following, the component seems to work:
Console log output
TypeError: queryList.addEventListener is not a function. (In 'queryList.addEventListener("change", handleMediaChange)', 'queryList.addEventListener' is undefined)
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: