react-native-roots

0.0.4 • Public • Published

react-native-roots

<View>
  <App />         <---- original app
  <YourView1 />   <---- your view
  <YourView2 />   <---- your view
  <YourView3 />   <---- your view
  ...
</View>

Installation

npm install react-native-roots --save

Usage

import Roots from 'react-native-roots';
 
// add root view
Roots.add('loading', (
  <View style={styles.container}>
    <View style={styles.mask}>
      <ActivityIndicator
        animating
        size="small"
        color="#fff"
      />
    </View>
  </View>
));
 
// remove root view
Roots.remove('loading');

API

add(key, element)

add root view

remove(key)

remove root view

Readme

Keywords

Package Sidebar

Install

npm i react-native-roots

Weekly Downloads

2

Version

0.0.4

License

Apache-2.0

Unpacked Size

14.6 kB

Total Files

5

Last publish

Collaborators

  • jeepeng