netguru / sticky-parallax-header

A simple React Native library, enabling the creation of fully customized header for your iOS and Android apps.
https://netguru.github.io/sticky-parallax-header/
MIT License
1.86k stars 190 forks source link

Web does not work without React Native Reanimated Babel/SWC plugin #394

Closed Gabrola closed 1 year ago

Gabrola commented 1 year ago

Feature request

On Web using Reanimated's Babel/SWC plugin is optional, this does not work with sticky-parallax-header because Reanimated's hooks do not have dependencies explicitly declared. See https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/web-support/#web-without-a-babel-plugin

This is the error that is returned

Unhandled Runtime Error
Error: useAnimatedStyle was used without a dependency array or Babel plugin. Please explicitly pass a dependency array, or enable the Babel/SWC plugin.

For more, see the docs: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/web-support#web-without-a-babel-plugin

Call Stack
useAnimatedStyle
../node_modules/react-native-reanimated/lib/module/reanimated2/hook/useAnimatedStyle.js (313:12)
TabbedHeaderListInner
../node_modules/react-native-sticky-parallax-header/lib/module/predefinedComponents/TabbedHeader/TabbedHeaderList.js (45:48)