Commit 4f1cd779 by GOLF

add event

1 parent ae138ca6
Showing with 29 additions and 3 deletions
......@@ -170,7 +170,7 @@ let input2Parameter
####Boolean Variable
#### Boolean Variable
ขึ้นต้นด้วยคำว่า "is" หรือ "has" ตามบริบทของการใช้งาน
......@@ -181,7 +181,7 @@ const hasChild = false
####Local Constant Variable
#### Local Constant Variable
ตัวอักษรภาษาอังกฤษตัวพิมพ์<u>เล็ก</u> ทั้งหมด คั่นระหว่างคำด้วย "_"
......@@ -319,7 +319,33 @@ import '../../resources/style/css/style.css';
## 3. Event Handling
Test
### Event Emitter
#### Publish (emit)
```javascript
this.props.eventEmitter.emit(actionName,data)
```
#### Subscription (on)
```javascript
this.props.eventEmitter.on(actionName,listener)
```
#### Unsubscription (removeAllListeners)
```javascript
this.props.eventEmitter.removeListener()
```
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!