Skip to content

Remove Touchable (base) from public API (#57476) - #57476

Closed
huntie wants to merge 2 commits into
react:mainfrom
huntie:export-D111022549
Closed

Remove Touchable (base) from public API (#57476)#57476
huntie wants to merge 2 commits into
react:mainfrom
huntie:export-D111022549

Conversation

@huntie

@huntiehuntie commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary:

NOTE: Resubmission of D110488985.

Motivation

The public type for Touchable has zero overlap with its runtime value. This is an internal implementation object which is undocumented.

https://www.internalfb.com/code/fbsource/[86267213ee84]/xplat/js/react-native-github/packages/react-native/Libraries/Components/Touchable/Touchable.d.ts?lines=18-24

https://www.internalfb.com/code/fbsource/[86267213ee84]/xplat/js/react-native-github/packages/react-native/Libraries/Components/Touchable/Touchable.js?lines=966-986

Replaces D110483989 / #57419.

Impact

This is a breaking change with few open source consumers. The onTouchStart etc prop typings are part of ViewProps today, which is a suitable replacement.

Across projects I've been testing for the Strict TypeScript API rollout, the only load bearing consumer was Uniwind — where I've sent a PR to address this.

Changelog:
[General][Breaking] - The Touchable root export (undocumented) is removed. If you are extending Touchable as a type, please use ViewProps instead.

Reviewed By: rubennorte

Differential Revision: D111022549

@meta-clameta-claBot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 8, 2026
@meta-codesync

Copy link
Copy Markdown

@huntie has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111022549.

@github-actions

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: BREAKING

huntie added a commit to huntie/react-native that referenced this pull request Jul 8, 2026
Summary:
NOTE: Resubmission of D110488985.
**Motivation**
The public type for `Touchable` has zero overlap with its runtime value. This is an internal implementation object which is undocumented.
https://www.internalfb.com/code/fbsource/[86267213ee84]/xplat/js/react-native-github/packages/react-native/Libraries/Components/Touchable/Touchable.d.ts?lines=18-24https://www.internalfb.com/code/fbsource/[86267213ee84]/xplat/js/react-native-github/packages/react-native/Libraries/Components/Touchable/Touchable.js?lines=966-986
Replaces D110483989 / react#57419.
**Impact**
This is a **breaking change** with few open source consumers. The `onTouchStart` etc prop typings are part of `ViewProps` today, which is a suitable replacement.
Across projects I've been testing for the Strict TypeScript API rollout, the only load bearing consumer was Uniwind — where I've sent a PR to address this.
- uni-stack/uniwind#592.
Changelog: [General][Breaking] - The `Touchable` root export (undocumented) is removed. If you are extending `Touchable` as a type, please use `ViewProps` instead.
Reviewed By: rubennorte
Differential Revision: D111022549
huntie added 2 commits July 8, 2026 09:17
Summary:
NOTE: Resubmission of D110890810.
Replace `'react-native/Libraries/Core/InitializeCore'` with an explicit `'react-native/setup-env'` secondary export.
This was previously a special-case path excluded from our ESLint warnings. It is now formalised.
**Changes**
- Add new `src/setup-env.js` entry point and `package.json` mapping.
- Replace references in `packages/metro-config/` and `packages/community-cli-plugin/`.
- Update `warn-on-deep-imports` ESLint rule.
Changelog: [General][Added] - Add `'react-native/setup-env'` entry point. This replaces the previous side-effectful `'react-native/Libraries/Core/InitializeCore'`. [General][Deprecated] - Deprecate `'react-native/Libraries/Core/InitializeCore'`. Use `'react-native/setup-env'` instead.
Reviewed By: rubennorte
Differential Revision: D111022546
Summary:
NOTE: Resubmission of D110488985.
**Motivation**
The public type for `Touchable` has zero overlap with its runtime value. This is an internal implementation object which is undocumented.
https://www.internalfb.com/code/fbsource/[86267213ee84]/xplat/js/react-native-github/packages/react-native/Libraries/Components/Touchable/Touchable.d.ts?lines=18-24https://www.internalfb.com/code/fbsource/[86267213ee84]/xplat/js/react-native-github/packages/react-native/Libraries/Components/Touchable/Touchable.js?lines=966-986
Replaces D110483989 / react#57419.
**Impact**
This is a **breaking change** with few open source consumers. The `onTouchStart` etc prop typings are part of `ViewProps` today, which is a suitable replacement.
Across projects I've been testing for the Strict TypeScript API rollout, the only load bearing consumer was Uniwind — where I've sent a PR to address this.
- uni-stack/uniwind#592.
Changelog: [General][Breaking] - The `Touchable` root export (undocumented) is removed. If you are extending `Touchable` as a type, please use `ViewProps` instead.
Reviewed By: rubennorte
Differential Revision: D111022549
@meta-codesyncmeta-codesyncBot changed the title Remove Touchable (base) from public APIRemove Touchable (base) from public API (#57476)Jul 8, 2026
@huntie
huntieforce-pushed the export-D111022549 branch from fa31c75 to 1630a84CompareJuly 8, 2026 16:17
@meta-codesync

Copy link
Copy Markdown

This pull request has been merged in 6fbf306.

@meta-codesyncmeta-codesyncBot added the Merged This PR has been merged. label Jul 8, 2026
@huntie
huntie deleted the export-D111022549 branch July 8, 2026 16:38
zeyap pushed a commit that referenced this pull request Jul 13, 2026
Summary:
Pull Request resolved: #57476
NOTE: Resubmission of D110488985.
**Motivation**
The public type for `Touchable` has zero overlap with its runtime value. This is an internal implementation object which is undocumented.
https://www.internalfb.com/code/fbsource/[86267213ee84]/xplat/js/react-native-github/packages/react-native/Libraries/Components/Touchable/Touchable.d.ts?lines=18-24https://www.internalfb.com/code/fbsource/[86267213ee84]/xplat/js/react-native-github/packages/react-native/Libraries/Components/Touchable/Touchable.js?lines=966-986
Replaces D110483989 / #57419.
**Impact**
This is a **breaking change** with few open source consumers. The `onTouchStart` etc prop typings are part of `ViewProps` today, which is a suitable replacement.
Across projects I've been testing for the Strict TypeScript API rollout, the only load bearing consumer was Uniwind — where I've sent a PR to address this.
- uni-stack/uniwind#592.
Changelog:
[General][Breaking] - The `Touchable` root export (undocumented) is removed. If you are extending `Touchable` as a type, please use `ViewProps` instead.
Reviewed By: rubennorte
Differential Revision: D111022549
fbshipit-source-id: bf29ae826d34fb04889b9f56de0f11904fce3f53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.meta-exportedp: FacebookPartner: FacebookPartner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@huntie