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

https://github.com/cawfree/react-native-uri-box

An extendible React <Component/> which will attempt to render source content consistently, based on the MIME type.
https://github.com/cawfree/react-native-uri-box

arbitrary content generic react react-native uri

Last synced: about 1 year ago
JSON representation

An extendible React <Component/> which will attempt to render source content consistently, based on the MIME type.

Awesome Lists containing this project

README

          

# react-native-uri-box
An extendible React <Component/> which will attempt to render source content consistently, based on the MIME type.

## 🚀 Getting Started

Using [`npm`]():

```sh
yarn add react-native-uri-box
```

Using [`yarn`]():

```sh
yarn add react-native-uri-box
```

## ✍️ Example
Just use this as a drop-in component for your remote content:

```javascript
import UriBox, { LookUpTable } from 'react-native-uri-box';
import Video from 'react-native-video';

const App = () => (
(

),
}}
/>
);
```

## 📌 Prop Types

Property | Type | Required | Default value | Description
:--- | :--- | :--- | :--- | :---
Component|custom|no|View| Defines the parent for your content. As an example, you could pass an ` to render whilst loading.
UnsupportedComponent|custom|no|<See the source code>|What to render if the requested MIME type is not supported.
style|shape|no|styles.container| Parent component styling. The dynamic contents will be sized to fill this .
source|union|no|null|What source to render; expects an object with a single key `uri`.
lookUpTable|shape|no|<See the source code>|Defines the table of mappings to determine which components are used for which MIME types.
-----

## ✌️ License
[MIT](https://opensource.org/licenses/MIT)



Buy @cawfree a coffee