Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beilunyang/react-native-root-view
inject a component to root container component
https://github.com/beilunyang/react-native-root-view
Last synced: 1 day ago
JSON representation
inject a component to root container component
- Host: GitHub
- URL: https://github.com/beilunyang/react-native-root-view
- Owner: beilunyang
- License: mit
- Created: 2018-02-26T16:08:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T06:57:46.000Z (over 6 years ago)
- Last Synced: 2024-10-03T18:48:32.610Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 168 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-root-view
inject a component to root container component[![npm](https://img.shields.io/npm/l/express.svg)]()
[![NPM](https://nodei.co/npm/react-native-root-view.png)](https://nodei.co/npm/react-native-root-view/)
## Install
```bash
npm install --save react-native-root-view
// or
yarn add react-native-root-view
```## Usage
```javascript
import rootView from 'react-native-root-view';// inject a component
const id = rootView.set();// remove the injected component
rootView.remove(id);
```## Example
```bash
git clone https://github.com/beilunyang/react-native-root-view
cd react-native-root-view/example
npm install
npm install react-native-root-view
npm start
```## License
MIT