You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[fix] Clipboard: align setString return type with React Native - #2900
Align Clipboard.setString with React Native's void return contract, following the review feedback. React Native's NativeClipboard spec does not return a copy-success status.
Remove the Web-specific boolean return and update the API documentation and clipboard example accordingly. This changes the previous Web return contract: callers should no longer use the result as a copy-success indication. The extra tests from the initial revision have been removed as requested; copying, exception handling, and cleanup remain unchanged.
Repository formatting, lint, and diff checks pass.
Isolated local checks confirm the method returns no value and cleans up its temporary node and selection whether the browser command succeeds, returns false, or throws.
Flow is not verified locally: the pinned 0.148.0 macOS binary exits with architecture error -86 on this arm64 host. Upstream CI runs the checker on Linux.
AI assistance: OpenAI Codex implemented the initial fix and this revision on behalf of @KuroGeo.
KuroGeo
changed the title
[fix] Clipboard: return the actual copy command result
[fix] Clipboard: align setString return type with React Native
Oct 9, 2026
Updated in 891bfc6. Clipboard.setString now returns void, and the API docs and clipboard example have been updated to match. The additional tests from the initial revision have been removed.
The existing DOM and Node suites pass: 721 tests passed, 6 existing skips, and 220 snapshots passed. Formatting and lint checks also pass.
Closing this. The divergence from react-native is explained in the docs, and Clipboard is deprecated for a while and will be removed in React Native 0.89. It does not worth it to introduce a breaking change for such a short amount of time (as it will be removed from here too)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Align
Clipboard.setStringwith React Native'svoidreturn contract, following the review feedback. React Native's NativeClipboard spec does not return a copy-success status.Remove the Web-specific boolean return and update the API documentation and clipboard example accordingly. This changes the previous Web return contract: callers should no longer use the result as a copy-success indication. The extra tests from the initial revision have been removed as requested; copying, exception handling, and cleanup remain unchanged.
Validation on Node 24.13.0:
AI assistance: OpenAI Codex implemented the initial fix and this revision on behalf of @KuroGeo.