Skip to content

Breaking change in @react-navigation/core 7.17.0: createComponentForStaticNavigation removed #13045

@natew

Description

@natew

Summary

@react-navigation/core@7.17.0 renamed createComponentForStaticNavigation to createComponentForStaticConfigDeprecated, removing the old export name entirely. This breaks @react-navigation/native@7.1.34 which still imports the old name.

Reproduction

npm install @react-navigation/native@7.1.34 @react-navigation/core@7.17.0

Then any code that triggers @react-navigation/native/lib/module/createStaticNavigation.js will fail:

Error: "createComponentForStaticNavigation" is not exported by
"@react-navigation/core/lib/module/index.js"

Details

core 7.16.1 (works):

export { createComponentForStaticNavigation, createPathConfigForStaticNavigation } from "./StaticNavigation.js";

core 7.17.0 (broken):

export { createComponentForStaticConfigDeprecated as createComponentForStaticConfig, createPathConfigForStaticNavigation } from "./StaticNavigation.js";

The old name createComponentForStaticNavigation is removed without any alias, but @react-navigation/native still imports it:

// @react-navigation/native/lib/module/createStaticNavigation.js line 3
import { createComponentForStaticNavigation, createPathConfigForStaticNavigation } from '@react-navigation/core';

Expected behavior

Either:

  1. Keep createComponentForStaticNavigation as an alias in core 7.17 (since native still imports it)
  2. Or release a new @react-navigation/native version that uses the new name

Removing an export that sibling packages depend on in a minor version is a semver violation.

Versions

  • @react-navigation/core: 7.17.0
  • @react-navigation/native: 7.1.34

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