Skip to content

Screens preset (mock engine): react-native-screens/experimental serves the root namespace #877

Open

Description

@danfry1

Under engine: 'mock', the screens preset serves its root namespace for the react-native-screens/experimental entry. That entry's own exports are missing: import { SafeAreaView } from 'react-native-screens/experimental' is undefined, and rendering it throws "Element type is invalid … got: undefined". Root-only exports such as enableScreens appear on it instead.

Under the default engine the entry loads its real file (since #459), and SafeAreaView renders its children.

Seen with react-native 0.88.1, react-native-screens 4.30.1 and vitest 5.1.0 on platform: 'android'. First reported in #717 (comment).

Acceptance criteria

  • Under engine: 'mock', react-native-screens/experimental exports what the installed package's entry exports, and does not export root-only names.
  • SafeAreaView from that entry renders its children under the mock engine.
  • A test, written in this repository's own fixtures, fails on main and passes with the fix.

Thanks @YevheniiKotyrlo for the report.

Activity

  1. added this to the 0.16.0 milestone on Nov 15, 2026
  2. added
    bug
    area:presets
    priority:low
    on Nov 15, 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

    area:presetsbugpriority:low

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions