React Native component used to provide the features of pass different context menu items and events


``javascript
import { SelectableText } from "@astrocoders/react-native-selectable-text";
// Use normally, it is a drop-in replacement for react-native/Text
/*
Called when the user taps in a item of the selection menu:
- eventType: (string) is the label
- content: (string) the selected text portion
- selectionStart: (int) is the start position of the selected text
- selectionEnd: (int) is the end position of the selected text
*/
onSelection={({ eventType, content, selectionStart, selectionEnd }) => {}}
value="I crave star damage"
/>;
`
$ npm install @astrocoders/react-native-selectable-text --save
$ react-native link @astrocoders/react-native-selectable-text
#### iOS - Binary Linking (Alternative 1)
1. In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name]node_modules
2. Go to ➜ @astrocoders/react-native-selectable-text and add RNSelectableText.xcodeprojlibRNSelectableText.a
3. In XCode, in the project navigator, select your project. Add to your project's Build Phases ➜ Link Binary With LibrariesCmd+R
4. Run your project ()<
#### iOS - Pods (Alternative 2)
1. Add pod 'RNSelectableText', :path => '../node_modules/@astrocoders/react-native-selectable-text/ios/RNSelectableText.podspec' to your projects podfilepod install
2. run
#### Android
1. Open up android/app/src/main/java/[...]/MainActivity.java
- Add import com.astrocoders.selectabletext.RNSelectableTextPackage; to the imports at the top of the filenew RNSelectableTextPackage()
- Add to the list returned by the getPackages() method
2. Append the following lines to android/settings.gradle:`
`
include ':react-native-selectable-text'
project(':react-native-selectable-text').projectDir = new File(rootProject.projectDir, '../node_modules/@astrocoders/react-native-selectable-text/android')
android/app/build.gradle
3. Insert the following lines inside the dependencies block in :`
`
compile project(':react-native-selectable-text')