How to use the react-native-root-siblings function in react-native-root-siblings

To help you get started, we’ve selected a few react-native-root-siblings examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NervJS / taro / packages / taro-rn / src / api / interface / toast.js View on Github external
ToastView = 
  }

  try {
    // setTimeout fires incorrectly when using chrome debug #4470
    // https://github.com/facebook/react-native/issues/4470
    global.wxToastRootSiblings && global.wxToastRootSiblings.destroy()

    global.wxToastRootSiblings = new RootSiblings(ToastView)
    setTimeout(() => {
      global.wxToastRootSiblings && global.wxToastRootSiblings.update(ToastView)
      success && success()
    }, 100)
    if (duration > 0) {
      setTimeout(() => {
        console.log('destroy')
        global.wxToastRootSiblings && global.wxToastRootSiblings.destroy()
      }, duration)
    }
    return successHandler(success, complete)(res)
  } catch (e) {
    res.errMsg = `showToast:fail invalid ${e}`
    return errorHandler(fail, complete)(res)
  }
}
github jacklam718 / react-native-modals / src / Modal.js View on Github external
createModal() {
    // Protect against setState happening asynchronously
    if (!this.sibling) {
      this.sibling = new Sibling(this.renderModal());
    }
  }
github 15826954460 / BXStage / app / components / CNotice.js View on Github external
static showSiblings = (params) => {
    SiblingsNotice.siblingInstance = new RootSiblings()
  };
github jacklam718 / react-native-action-sheet-component / src / ActionSheetManager.js View on Github external
setCurrent(props: Object, callback?: Function = () => {}): void {
    if (!props) {
      return;
    }

    this.currentActionSheet = new RootSiblings(
      ,
      callback,
    );
  }
github N3TC4T / Nearby-Live / src / components / ui / alerts / Alert.js View on Github external
componentWillMount() {
        this._alert = new RootSiblings();
    }
github gaoxiaosong / react-native-general-actionsheet / index.js View on Github external
showActionSheetWithOptions: (config, callback) => {
        if (Platform.OS === 'ios' && ActionSheet.useActionSheetIOS) {
            ActionSheetIOS.showActionSheetWithOptions(config, callback);
            return;
        }
        if (instance) {
            return;
        }
        instance = new RootSiblings(
             {
                    instance && instance.destroy(() => {
                        instance = null;
                        setTimeout(() => {
                            callback && callback(index);
                        }, 0);
                    });
                }}
            />
        );
    },
};
github amandakelake / ReactNativeNavigationDemo / src / screen / home / index.js View on Github external
import React, { Component } from 'react';
import { Text, View, StyleSheet, TouchableOpacity } from 'react-native';
import RootSiblings from 'react-native-root-siblings';

import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as homeActions from '../../action/home';

let sibling = new RootSiblings(
  (
github liuzheng644607 / react-native-intro / src / IntroManage.js View on Github external
start = () => {
    if (!this.sibling) {
      this.sibling = new RootSiblings(
        (
           (this.refModal = c)}
            next={this.next}
            prev={this.prev}
            stop={this.stop}
            contentRender={this.opts.contentRender}
            showStepNumber={this.opts.showStepNumber}
            maskStyle={this.opts.maskStyle}
            touchable={this.opts.touchable}
            maskClosable={this.opts.maskClosable}
          />
        )
      );
    }
    this.cleartTimers();
github airloy / objective / src / widgets / ActivityIndicator.js View on Github external
static show(type='Circle') {
    indicator || (
      indicator = new RootSiblings(
        
      )
    );
  }

react-native-root-siblings

react native root sibling elements manager

MIT
Latest version published 7 months ago

Package Health Score

67 / 100
Full package analysis