File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 1
1
# React-web-notification [ ![ Build Status] ( https://travis-ci.org/georgeOsdDev/react-web-notification.svg?branch=develop )] ( https://travis-ci.org/georgeOsdDev/react-web-notification ) [ ![ npm version] ( https://badge.fury.io/js/react-web-notification.svg )] ( http://badge.fury.io/js/react-web-notification )
2
2
3
3
React component with [ HTML5 Web Notification API] ( https://developer.mozilla.org/en/docs/Web/API/notification ) .
4
+ This component show nothing in dom element, but trigger HTML5 Web Notification API with ` render ` method in the life cycle of React.js.
4
5
5
6
## Demo
6
7
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ class App extends React.Component {
51
51
52
52
handleButtonClick ( ) {
53
53
54
+ if ( this . state . ignore ) {
55
+ return ;
56
+ }
57
+
54
58
const now = Date . now ( ) ;
55
59
56
60
const title = 'React-Web-Notification' + now ;
You can’t perform that action at this time.
0 commit comments