Skip to content

Framework fails to call ViewManager.updateState() on custom views #55171

Description

@alpha0010

Description

On android, overriding updateState appears to be the only way to pass information to shadow nodes (which I need for the library port I am working on). This works fine on RN 0.81.1 (used in the prior link), but on RN 0.83.1, the function is never called (see reproducer link).

Steps to reproduce

  1. npm install
  2. npm run android
  3. Notice the square is green not red
  4. Optionally, set a breakpoint at android/app/src/main/java/com/updatestatebug/SampleViewManager.kt:33, and notice it is never hit

React Native Version

0.83.1

Affected Platforms

Runtime - Android

Areas

Fabric - The New Renderer

Output of npx @react-native-community/cli info

System:
  OS: macOS 26.2
  CPU: (8) arm64 Apple M1 Pro
  Memory: 147.19 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 25.2.1
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 11.6.2
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2025.11.10.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/lib/ruby/gems/3.4.0/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.2
      - iOS 26.2
      - macOS 26.2
      - tvOS 26.2
      - visionOS 26.2
      - watchOS 26.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.2 AI-252.27397.103.2522.14514259
  Xcode:
    version: 26.2/17C52
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 21.0.8
    path: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/javac
  Ruby:
    version: 3.4.7
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: 20.0.0
  react:
    installed: 19.2.0
    wanted: 19.2.0
  react-native:
    installed: 0.83.1
    wanted: 0.83.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Stacktrace or Logs

N/A

MANDATORY Reproducer

https://github.com/alpha0010/rn-updatestate-bug

Screenshots and Videos

No response

Activity

  1. added a commit that references this issue on Jan 19, 2026
  2. alpha0010 commented on Feb 17, 2026

    @alpha0010
    ContributorAuthor

    Turns out I had a misconfiguration that worked fine with the example project, but failed to utilize the custom shadow node implementation when installed as a regular package.

    Furthermore when preparing the reproducer, I was mislead by the comment:

    https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java#L231

        // Only present in Fabric; but always present in Fabric.
        if (stateWrapper != null) {
          Object extraData = updateState(view, initialProps, stateWrapper);

    So I did not think I needed to stub out a custom shadow node. However, that comment is false, as components with default generated shadow nodes do not get a state handle.

  3. react-native-bot commented on Aug 17, 2026

    @react-native-bot
    Collaborator

    This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

  4. react-native-bot commented on Aug 17, 2026

    @react-native-bot
    Collaborator

    This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.

  5. added
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    and removed
    StaleThere has been a lack of activity on this issue and it may be closed soon.
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions