--- id: linking title: Linking ---
`Linking` gives you a general interface to interact with both incoming and outgoing app links. ### Basic Usage #### Handling deep links If your app was launched from an external url registered to your app you can access and handle it from any component you want with ``` componentDidMount() { Linking.getInitialURL().then((url) => { if (url) { console.log('Initial url is: ' + url); } }).catch(err => console.error('An error occurred', err)); } ``` NOTE: For instructions on how to add support for deep linking on Android, refer to [Enabling Deep Links for App Content - Add Intent Filters for Your Deep Links](http://developer.android.com/training/app-indexing/deep-linking.html#adding-filters). If you wish to receive the intent in an existing instance of MainActivity, you may set the `launchMode` of MainActivity to `singleTask` in `AndroidManifest.xml`. See [`