Gathering detailed insights and metrics for react-native-push-notification-popup
Gathering detailed insights and metrics for react-native-push-notification-popup
npm install react-native-push-notification-popup
Typescript
Module System
Node Version
NPM Version
73.6
Supply Chain
100
Quality
75.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
614,584
Last Day
370
Last Week
3,864
Last Month
9,607
Last Year
179,622
MIT License
145 Stars
54 Commits
39 Forks
2 Watchers
22 Branches
7 Contributors
Updated on Oct 24, 2024
Latest Version
1.7.0
Package Id
react-native-push-notification-popup@1.7.0
Unpacked Size
23.63 kB
Size
7.69 kB
File Count
13
NPM Version
9.6.7
Node Version
18.17.0
Published on
Aug 17, 2023
Cumulative downloads
Total Downloads
Last Day
5.7%
370
Compared to previous day
Last Week
128.6%
3,864
Compared to previous week
Last Month
25.1%
9,607
Compared to previous month
Last Year
28.4%
179,622
Compared to previous year
1
Animation
package
This package is here to help. Just show your own notification popup to your users!
1# yarn, recommended 2yarn add react-native-push-notification-popup 3 4# or npm 5npm install react-native-push-notification-popup --save
Put it in a wrapper component. (Maybe where you handle your incoming push notifications)
1import NotificationPopup from 'react-native-push-notification-popup'; 2 3class MyComponent extends React.Component { 4 render() { 5 return ( 6 <View style={styles.container}> 7 <MaybeYourNavigator /> 8 <NotificationPopup ref={ref => this.popup = ref} /> 9 </View> 10 ); 11 } 12// ...
IMPORTANT: Remember to put it on the bottom of other components, because React render from back to front in order of declaration. We do not use
zIndex
becuase it is problematic on Android.
1// Render function 2const renderCustomPopup = ({ appIconSource, appTitle, timeText, title, body }) => ( 3 <View> 4 <Text>{title}</Text> 5 <Text>{body}</Text> 6 <Button title='My button' onPress={() => console.log('Popup button onPress!')} /> 7 </View> 8); 9 10class MyComponent extends React.Component { 11 render() { 12 return ( 13 <View style={styles.container}> 14 <NotificationPopup 15 ref={ref => this.popup = ref} 16 renderPopupContent={renderCustomPopup} 17 shouldChildHandleResponderStart={true} 18 shouldChildHandleResponderMove={true} 19 isSkipStatusBarPadding={true} /> 20 </View> 21 ); 22 } 23// ...
1componentDidMount() { 2 this.popup.show({ 3 onPress: function() {console.log('Pressed')}, 4 appIconSource: require('./assets/icon.jpg'), 5 appTitle: 'Some App', 6 timeText: 'Now', 7 title: 'Hello World', 8 body: 'This is a sample message.\nTesting emoji 😀', 9 slideOutTime: 5000 10 }); 11}
Param | Type | Default | Description |
---|---|---|---|
renderPopupContent | function (options?: { appIconSource?: ImageSourcePropType; appTitle?: string; timeText?: string; title?: string;body?: string; }) => React.ReactElement<any> | null | Render your own custom popup body (Optional) |
shouldChildHandleResponderStart | boolean | false | By default, parent popup will prevent bubbling event to child. This should be set to true if you have button inside your custom popup that wants to receive the event. |
shouldChildHandleResponderMove | boolean | false | By default, parent popup will prevent bubbling event to child. This should be set to true if you have button inside your custom popup that wants to receive the event. |
isSkipStatusBarPadding | boolean | false | Set this to true if your app is an Android app with non-translucent StatusBar. (See #35) |
Param | Type | Default | Description |
---|---|---|---|
onPress | Function | null | Callback to be called when user press the popup |
appIconSource | Image source | null | Icon on the upper left |
appTitle | String | '' | Usually your app name, but you can also customize it |
timeText | String | '' | Text on the upper right |
title | String | '' | Message title |
body | String | '' | Message body (support multi-line) |
slideOutTime | Number | 4000 | Time until notification slides out |
yarn --production
"react-native-push-notification-popup": "file:../react-native-push-notification-popup"
yarn --production
whenever there is any code changeyarn
(Install devDependencies)yarn run lint
MIT License. © Carson Wah 2018
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 6/29 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
59 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More