Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/enzoferey/react-open-app

Open your users native apps using deep links
https://github.com/enzoferey/react-open-app

deep-links mobile-app react

Last synced: 3 months ago
JSON representation

Open your users native apps using deep links

Awesome Lists containing this project

README

        

# react-open-app

[![Build Status](https://travis-ci.org/enzoferey/react-open-app.svg?branch=master)](https://travis-ci.org/enzoferey/react-open-app)

Open your users native apps using deep links

## Install

`npm install --save react-open-app`

## Usage

```jsx
import OpenApp from "react-open-app";

const App = () => (


Hello World


Twitter

);
```

This library uses my library [url-to-deep-link](https://github.com/enzoferey/url-to-deep-link) to transform URLs into deep links. If you want to redirect your users to a non supported app you can do it throught `android` and `ios` props:

```jsx
import OpenApp from "react-open-app";

const App = () => (


Hello World



My app


);
```

## Props

| Name | Type | Description |
| ------------- | --------- | ---------------------------------------------------------- |
| **`href`** | `String` | The URL to be opened in the user's apps |
| **`android`** | `String` | Custom deep link for Android devices to be used |
| **`ios`** | `String` | Custom deep link for iOS devices to be used |
| **`blank`** | `Boolean` | Should the URL be open in another window in fallback case. |

Any other prop will be passed down to the underlying `` tag.

## Test

`npm run test`

## Build (webpack)

`npm run build`

## License

MIT