Skip to content

[Bug]: react-native-web-vite throws reanimated useAnimatedStyle used without dependency array error #34768

@NiGhTTraX

Description

@NiGhTTraX

Describe the bug

I am building an app with heroui-native and Storybook for React Native Web. The app works fine on web when Expo bundles it with Metro, but when bundled with SB RNW I get the following error from reanimated:

[Reanimated] useAnimatedStyle was used without a dependency array or Babel plugin. Please explicitly pass a dependency array, or enable the Babel plugin.
For more, see the docs: https://docs.swmansion.com/react-native-reanimated/docs/guides/web-support#web-without-the-babel-plugin.

Image

On device Storybook with React Native works just fine! Expo on web works fine. It's only SB with RNW that fails with this error.

Reproduction link

https://github.com/NiGhTTraX/sb-native-reanimated

Reproduction steps

  1. Go to the above link.
  2. Run pnpm install
  3. Run pnpm run storybook
  4. Load the first Button story

Expected

The story loads and shows a simple button.

Actual

[Reanimated] `useAnimatedStyle` was used without a dependency array or Babel plugin. Please explicitly pass a dependency array, or enable the Babel plugin.

System

System:
│  OS: macOS 26.4.1
│  CPU: (8) arm64 Apple M1 Pro
│  Shell: 5.9 - /bin/zsh
│  Binaries:
│  Node: 24.13.1
│  pnpm: 10.33.1 <----- active
│  Browsers:
│  Safari: 26.4
│  npmPackages:
│  @storybook/addon-ondevice-actions: ~10.4.2 => 10.4.2
│  @storybook/addon-ondevice-controls: ~10.4.2 => 10.4.2
│  @storybook/react-native: ~10.4.2 => 10.4.2
│  @storybook/react-native-web-vite: ~10.3.6 => 10.3.6
│  storybook: ~10.3.6 => 10.3.6

Additional context

I've already tried adding plugins: ["react-native-worklets/plugin"] in pluginReactOptions, as recommended in the docs, and it doesn't fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions