pwmckenna / react-native-activity-indicator-ios

ActivityIndicatorIOS wrapper that waits a second.

Home Page:https://www.npmjs.com/package/react-native-activity-indicator-ios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-activity-indicator-ios

ActivityIndicatorIOS wrapper that waits a second.

What problem does this solve?

The native ActivityIndicatorIOS shows the spinner immediately (assuming you don't set animating to false), which other loading indicators don't do because research shows feedback is not necessary for about a second.

This wrapper will wait the second before showing the spinner.

Installation

npm install react-native-activity-indicator-ios

Usage

Same api as ActivityIndicatorIOS.

var ActivityIndicatorIOS = require('react-native-activity-indicator-ios');

React.createClass({
  render: function () {
    return (
      <ActivityIndicatorIOS animating={this.state.loading} />
    );
  }
});

Demo

appetize.io is magic for demos. Check it out!

Acknowledgements

After using @kylemathews's spinkit library for loading icons, everything else felt unpolished. I wanted to use the native iOS activity indicator, but with all the polish I had grown accustomed to. Many thanks for the inspiration.

About

ActivityIndicatorIOS wrapper that waits a second.

https://www.npmjs.com/package/react-native-activity-indicator-ios

License:MIT License


Languages

Language:JavaScript 100.0%