ReScript bindings for @react-native-community/clipboard.
npm install @reason-react-native/clipboard@reason-react-native/clipboard


ReScript / Reason bindings for@react-native-community/clipboard.
Exposed as ReactNativeClipboard module.
@reason-react-native/clipboard X.y.\* means it's compatible with@react-native-community/clipboard X.y.\*
When@react-native-community/clipboard
is properly installed & configured by following their installation instructions,
you can install the bindings:
``console`
npm install @reason-react-native/clipboardor
yarn add @reason-react-native/clipboard
@reason-react-native/clipboard should be added to bs-dependencies in yourbsconfig.json:
`diff`
{
//...
"bs-dependencies": [
"reason-react",
"reason-react-native",
// ...
+ "@reason-react-native/clipboard"
],
//...
}
To attempt reading content from the Clipboard; resolves to a string if
successful.
`reason`
getString: unit => Js.Promise.t(string)
To copy a string to the Clipbard.
`reason`
setString: string => unit
`reason`
useClipboard: unit => (string, string => unit)
#### Example
`reason
open ReactNative;
ReactNativeClipboard.setString("initial value");
let make = () => {
let (data, setData) = ReactNativeClipboard.useClipboard();
};
``
---
Check the changelog for more informations about recent
releases.
---
Read the
contribution guidelines
before contributing.
We want this community to be friendly and respectful to each other. Please read
our full code of conduct
so that you can understand what actions will and will not be tolerated.