Commit e789fac8 authored by yann300's avatar yann300 Committed by GitHub

Update best-practices.md

parent 2da388f9
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
- `self._api = opts.api` `opts.api` is an object which contains functions/features that the module needs. - `self._api = opts.api` `opts.api` is an object which contains functions/features that the module needs.
- `opts.events` contains events manager the module will listen on. - `opts.events` contains events manager the module will listen on.
- A module trigger events using `event` property: - A module trigger events using `event` property:
 `self.event = new EventManager()` . Events can then be triggered:  `self.event = new EventManager()`.
Events can then be triggered:
 `self.event.trigger('eventName', [param1, param2])`  `self.event.trigger('eventName', [param1, param2])`
- `self._view` is the HTML view renderered by `yo-yo` in the `render` function. - `self._view` is the HTML view renderered by `yo-yo` in the `render` function.
- `render()` this function should be called: - `render()` this function should be called:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment