npm:
npm install react-native-loading-spinner-overlay
yarn:
yarn add react-native-loading-spinner-overlay
See the example App.js file for an example implementation.
Property | Type | Default | Description |
---|---|---|---|
cancelable | Boolean | false |
Android: If set to false, it will prevent spinner from hiding when pressing the hardware back button. If set to true, it will allow spinner to hide if the hardware back button is pressed. |
color | String | "white" |
Changes the spinner's color (example values are red , #ff0000 , etc). For adjusting the contrast see overlayColor prop below. |
animation | String (enum) none , slide , fade |
"none" |
Changes animation on show and hide spinner's view. |
overlayColor | String | rgba(0, 0, 0, 0.25) |
Changes the color of the overlay. |
size | String (enum) small , normal , large |
"large" |
Sets the spinner's size. No other cross-platform sizes are supported right now. |
textContent | String | "" |
Optional text field to be shown. |
textStyle | StyleSheet | - |
The style to be applied to the <Text> that displays the textContent . |
visible | Boolean | false |
Controls the visibility of the spinner. |
indicatorStyle | StyleSheet | undefined |
Additional styles for the ActivityIndicator to inherit |
customIndicator | Element | undefined |
An alternative, custom component to use instead of the default <ActivityIndicator /> |
children | Element | undefined |
Children element(s) to nest inside the spinner |
We recommend that you follow two rules when implementing this component.
Integrate it inside the parent-most/top-level/root component in your app
Wrap usage of actions after attempting to stop the spinner with setTimeout
to avoid the non-stop spinner issue:
this.setState({ spinner: false });
setTimeout(() => {
Alert.alert('Oops!', err.message);
}, 100);
Name | Website |
---|---|
Nick Baugh | http://niftylettuce.com |
Spencer Snyder | http://spencersnyder.io |
Luciano Lima | |
George Savvidis | |
Sandro Machado | |
Ben Sutter | |
Ivan Kuznetsov | |
Darren Camp | |
Rigo B Castro | |
Raj Kissu | |
Ivan Pusic | |
Antonio Grass | |
Vijay Chouhan | |
Jacob Lee | |
Matt Labrum |
MIT © Nick Baugh
前几周,boss给出一个任务:在网站页面加载前设置一个loading界面。 设置loading界面,如果用户网络状况一般,或者用户执行请求操作频繁,可以让用户减少等待时间,有利于提升用户体验。那么具体怎样实现loading界面呢?查询资料进行实践,得出下面几个方案: 方案一: 在react框架中,根据组件的生命周期,在componentdidmount进行判断。在render中进行判断:当用户网络
Loading dependency graph… 然后就没然后了!!!! 很尴尬!!!! 正常的现象应该是:Loading dependency graph, done. 这个问题困惑我很久!!!!! 再次给出解决方法: 这篇文章重新安装: https://blog.csdn.net/github_34402358/article/details/83145737 特别注意的地方: brew i
一、下载 react-native-splash-screen --save npm i react-native-splash-screen --save 二、自动安装终端链接 react-native link react-native-splash-screen 或 rnpm link react-native-splash-screen 三、手动安装终端链接 1.在 android
react-native-overlay 是一个 <Overlay /> 组件,视图前端包括内容,无视当前组件树的位置。 示例: var React = require('react-native');var Overlay = require('react-native-overlay');var BlurView = require('react-native-blur').BlurView;
react-infinite-loading 基于浏览器的 React 无限滚动插件 安装 react-infinite-loading 要求 React 15 或更高版本 install --save-dev react-infinite-loading 使用 import Infinite from 'react-infinite-loading';<Infinite handleLoadin
本文向大家介绍react-native 启动React Native Packager,包括了react-native 启动React Native Packager的使用技巧和注意事项,需要的朋友参考一下 示例 在最新版本的React Native上,无需运行打包程序。它将自动运行。 默认情况下,这将在端口8081上启动服务器。要指定服务器所在的端口
本文向大家介绍React Native开发封装Toast与加载Loading组件示例,包括了React Native开发封装Toast与加载Loading组件示例的使用技巧和注意事项,需要的朋友参考一下 在App开发中,我们避免不了使用的两个组件,一个Toast,一个网络加载Loading,在RN开发中,也是一样,React Native官方并没有提供者这两个常用组件,需要开发者自己根据需求来自定
百度移动统计SDK支持使用react native框架的H5页面统计,封装好的插件已经在github上开源,相关用法具体请参考:https://github.com/BaiduMobileAnalysis/baidumobstat-react-native。
The React Native environment has a lot of little quirks, so this documentation is aimed at helping smooth those over. Please feel free to create issues on GitHub for recommendations and additions to t