button-with-spinner
This is a react native custom button component which supports in react native 0.60 and above. During API call’s or any time consuming operation, user will be visually informed from the button itself. This custom button will display a spinner when it is clicked to inform user that some processing is going and block the UI until processing is complete.
Getting started
$ npm install button-with-spinner --save
or
$ yarn add button-with-spinner
Mostly automatic installation
For react native version < 0.60, call react-native link before proceeding.
$ react-native link button-with-spinner
Follow the below steps, for all versions of react native that supports pod.
$ cd ios
$ pod install
Usage
; // Add a state in constructor with name isLoading and update it based on the operation performed <SaveButtonstyle=marginTop: 16buttonStyle=backgroundColor:'blue'title="Save"isLoading=thisstateisLoadingonButtonPress= { console;}/>