RootView.js 778 B

1234567891011121314151617181920212223242526272829303132
  1. import React, { Component } from 'react';
  2. import { StyleSheet, AppRegistry, View, Text } from 'react-native';
  3. import Loading from './Loading';
  4. import Toast from './Toast';
  5. // import Popup from './Popup';
  6. const originRegister = AppRegistry.registerComponent;
  7. AppRegistry.registerComponent = (appKey, component) => {
  8. return originRegister(appKey, function() {
  9. const OriginAppComponent = component();
  10. return class extends Component {
  11. render() {
  12. return (
  13. <View style={styles.container}>
  14. <OriginAppComponent />
  15. {/* 弹窗
  16. <Popup /> */}
  17. {/* 提示 */}
  18. <Toast />
  19. {/* //加载动画 */}
  20. <Loading />
  21. </View>
  22. );
  23. }
  24. };
  25. });
  26. };
  27. const styles = StyleSheet.create({
  28. container: {
  29. flex: 1,
  30. position: 'relative'
  31. }
  32. });