I need copy AKA clipboard functionality. The React Native docs say the native version is depreciated and you should use the community version:
Ive tried installing it but it didnt work, however the native version does:
yarn add @react-native-community/clipboard
import Clipboard from "@react-native-community/clipboard"; // Doesnt work
import { Clipboard } from "react-native"; // Does work
The error that I get is when you call Clipboard.setString("hello world 1");
:
TypeError: null is not an object
I had a similar issue with another community package (sorry I cant remember which one). I couldnt get it to work and a GitHub comment told me to use the native version, and then it was fine.
Does Expo not work with community packages? Or is it in fact using them under the hood? Or do I have some issue with my setup?