Open BenHodgsonR2R opened 3 days ago
@react-spring/web
@react-spring/three
@react-spring/native
@react-spring/konva
@react-spring/zdog
9.7.3
The useReducedMotion hook calls MediaQueryList.addEventListener(), this causes an error in older Safari browsers- which are yet to have this function available.
useReducedMotion
Doesn't throw an error and also honours the (prefers-reduced-motion) media query.
(prefers-reduced-motion)
https://codesandbox.io/s/eager-gould-hm3rtj?file=/src/App.tsx
Which react-spring target are you using?
@react-spring/web
@react-spring/three
@react-spring/native
@react-spring/konva
@react-spring/zdog
What version of react-spring are you using?
9.7.3
What's Wrong?
The
useReducedMotion
hook calls MediaQueryList.addEventListener(), this causes an error in older Safari browsers- which are yet to have this function available.To Reproduce
Expected Behaviour
Doesn't throw an error and also honours the
(prefers-reduced-motion)
media query.Link to repo
https://codesandbox.io/s/eager-gould-hm3rtj?file=/src/App.tsx