Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@reason-react-native/clipboard

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reason-react-native/clipboard

ReScript bindings for @react-native-community/clipboard.

  • 1.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
5
Weekly downloads
 
Created
Source

@reason-react-native/clipboard

Build Status Version Chat

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.*

Installation

When @react-native-community/clipboard is properly installed & configured by following their installation instructions, you can install the bindings:

npm install @reason-react-native/clipboard
# or
yarn add @reason-react-native/clipboard

@reason-react-native/clipboard should be added to bs-dependencies in your bsconfig.json:

{
  //...
  "bs-dependencies": [
    "reason-react",
    "reason-react-native",
    // ...
+    "@reason-react-native/clipboard"
  ],
  //...
}

Usage

Methods

getString

To attempt reading content from the Clipboard; resolves to a string if successful.

getString: unit => Js.Promise.t(string)

setString

To copy a string to the Clipbard.

setString: string => unit

Hooks

useClipboard

useClipboard: unit => (string, string => unit)
Example
open ReactNative;

ReactNativeClipboard.setString("initial value");

let make = () => {
  let (data, setData) = ReactNativeClipboard.useClipboard();

  <View>
    <Button title=data onPress={_ => setData("new value")} />
  </View>

};

Changelog

Check the changelog for more informations about recent releases.


Contribute

Read the contribution guidelines before contributing.

Code of Conduct

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.

Keywords

FAQs

Package last updated on 17 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc