Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/enzoferey/react-open-app
- Owner: enzoferey
- License: mit
- Created: 2018-08-02T07:57:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T13:30:40.000Z (about 1 year ago)
- Last Synced: 2024-10-13T21:49:07.106Z (3 months ago)
- Topics: deep-links, mobile-app, react
- Language: JavaScript
- Size: 1.18 MB
- Stars: 9
- Watchers: 5
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
);
```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