Skip to content

Commit bb6cf07

Browse files
author
Takeharu Oshida
committed
Improve example
1 parent 30d0543 commit bb6cf07

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 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)
22

33
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.
45

56
## Demo
67

example/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ class App extends React.Component {
5151

5252
handleButtonClick() {
5353

54+
if(this.state.ignore) {
55+
return;
56+
}
57+
5458
const now = Date.now();
5559

5660
const title = 'React-Web-Notification' + now;

0 commit comments

Comments
 (0)