Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stop usage of deprecated api #646

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

bronislav
Copy link
Contributor

@bronislav bronislav commented Aug 11, 2023

The Clipboard class has been extracted from the react-native core, and the proper way to use it is through a package @react-native-clipboard/clipboard.

  • Add the required package to the peer and dev dependencies.
  • Import the Clipboard object from the correct package.

Functional and no warning:

Simulator.Screen.Recording.-.iPhone.14.-.2023-08-10.at.17.53.50.mp4

Closes #461

Clipboard has been extracted from react-native core and proper way to
use it is through a new package `@react-native-clipboard/clipboard`:

- Add required package to the peer and dev dependencies.
- Import Clipboard object from correct package
@bronislav bronislav marked this pull request as draft August 11, 2023 00:47
@bronislav bronislav marked this pull request as ready for review August 11, 2023 00:56
@bronislav bronislav changed the title fix: warning Clipboard extracted from core fix: stop usage of deprecated api Aug 11, 2023
Copy link
Collaborator

@flochtililoch flochtililoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! Can I also put you in charge of installing that new dependency in our mobile repo?

@bronislav bronislav merged commit e456e7e into master Aug 11, 2023
6 checks passed
@bronislav bronislav deleted the ailin/fix-warning-clipboard-extracted branch August 11, 2023 03:57
flochtililoch added a commit that referenced this pull request Aug 14, 2023
flochtililoch added a commit that referenced this pull request Aug 15, 2023
Reverts #646

This library does not work "as-is" in the Expo demo app, forcing
additional/manual work to append. We should instead use the library
[expo-clipboard](https://docs.expo.dev/versions/v49.0.0/sdk/clipboard/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Demo app: Clipboard behavior using deprecated API
2 participants