yarn add @ya-wxapp-org/bus
import bus from '@ya-wxapp-org/bus'
// methods
bus.on('eventName', (val) => { /* callback */ })
bus.emit('eventName', val) // emit Event
bus.push('key', something) // like array.push
bus.pop('key') // get something
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
@ya-wxapp-org/bus © fimars, Released under the MIT License.
Authored and maintained by fimars with help from contributors (list).
github.com/fimars · GitHub @fimars · Twitter @fimars