
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-spinner-screen-overlay
Advanced tools
There are cases when we want to block the UI with a spinner overlay. It's the simplest way to prevent the user from doing any actions in the UI while a crucial process is taking place, like payments for example. This library provides such a functionality while still making itself as small as it can be.
I created this library to solve a problem I encountered while using react-native-loading-spinner-overlay. In iOS there were times when you show an alert right after removing the spinner and sometimes the alert will close itself even with cancelable: false option, there were also times when the spinner won't go away.
npm install --save react-native-spinner-screen-overlay
The recommended way is to put the component on your root component and simply toggle the visible props on or off. Pass true to visible when you want the spinner to show, false if otherwise.
export default class App extends Component {
constructor () {
this.state = {
blockUI: false
};
}
render () {
return (
<View style={{ flex: 1 }}>
// ... rest of the app
<SpinnerOverlay visible={this.state.blockUI} />
</View>
);
}
}
Though you can also render it anywhere, say on a particular route by simply doing something like this:
export default class LoginRoute extends Component {
// ... rest of the code
render () {
return (
<View style={{ flex: 1 }}>
// ... rest of the code
<SpinnerOverlay visible={this.state.sendingForm} />
</View>
);
}
}
| Name | Description | Expected | Default |
|---|---|---|---|
| modalBackground | The background color of the modal. | Any color recognized by React-Native. | rgba(0, 0, 0, 0.3) |
| spinnerColor | The color of the ActivityIndicator. | Any color recognized by React-Native. | #000 |
| spinnerContainerStyles | An object passed to the View which serves as the container of the ActivityIndicator. | A valid React-Native StyleSheet | { padding: 20, backgroundColor: '#fff', borderRadius: 20 } |
Discussions, questions, suggestions, bug reports, feature request, etc are all welcome. Just create an issue. Just ensure that you are responsive enough.
Created with :heart: by April Mintac Pineda.
FAQs
Screen overlay to block UI with a spinner.
We found that react-native-spinner-screen-overlay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.