Skip to content

[Bug] View not removed on return null in Observer after upgrading RN 0.82.1 → 0.83.0 #54940

@neegqi

Description

@neegqi

Description

On React Native 0.82.1, returning null from a MobX render would remove the previously rendered view.
After upgrading to React Native 0.83.0 (React 19.2) the view does not get removed as expected:

{() => {
switch (this.status) {
case 'loading':
return (
<ActivityIndicator style={{ width: 49, height: 49 }} size="small" color={colors.grey} />
);
case 'processing':
return (

);
}
return null;
}}

Steps to reproduce

1.	Create a minimal RN app with 0.82.1
2.	Render a conditional UI via MobX <Observer> that returns an element or null
3.	Change state to cause render to return null
4.	UI is correctly removed on 0.82.1
5.	Upgrade to RN 0.83.0
6.	Repeat steps: view is not removed when render returns null

import { Observer } from "mobx-react-lite";
import { ActivityIndicator, View } from "react-native";

class Store {
status = "idle"; // or 'loading' / 'processing'
}

const store = new Store();

// In component:

{() => {
switch (store.status) {
case "loading":
return ;
case "processing":
return ;
}
return null;
}}

React Native Version

react-native: 0.83.0 react: 19.2.0 mobx:6.15.0 mobx-react-lite: 4.1.1

Affected Platforms

Runtime - iOS, Runtime - Android

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

System:
  OS: macOS 15.6.1
  CPU: (10) arm64 Apple M1 Max
  Memory: 256.20 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 25.1.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.yarn/bin/yarn
  npm:
    version: 11.6.2
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2025.04.07.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/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.1 AI-251.26094.121.2512.13930704
  Xcode:
    version: 26.2/17C52
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 19.0.1
    path: /usr/bin/javac
  Ruby:
    version: 3.4.2
    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.0
    wanted: 0.83.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

--

MANDATORY Reproducer

--

Screenshots and Videos

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions