All Projects → crazycodeboy → react-native-event-bus

crazycodeboy / react-native-event-bus

Licence: MIT License
Event bus for react native, cross-interface communication solution, it works on iOS and Android.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-event-bus

game-executor
采用Reactor模式,注册readycreate, readyfinish事件到更新服务UpdateService,通过处理后进行模型缓存,然后将消息转化为 dispatchThread消息分配模型需要的create, update, finish的事件进行单线程循环调度 。调度过程使用了系统预置锁模型,来进行多线程唤醒机制,将所有的update循环检测进行多 线程调度,多线程更新服务使用future-listener机制,在完成调度后,根据模型状态,如果模型存活重新将消息转化为update 事件注册到dispatchThread消息分配模型进行循环处理。如果模型死亡将消息转化为readyfinish事件注册到更新服务UpdateServic进行销毁 。这个系统实现了模型自动缓存,多…
Stars: ✭ 28 (-41.67%)
Mutual labels:  eventbus, event-bus
e
A library which combines a eventBus/emitter, DOM events management, delegated events, and event-based utils into a single lightweight and performant library.
Stars: ✭ 37 (-22.92%)
Mutual labels:  eventbus
CEventCenter
一个Android事件分发中心库,基于对象池及接口回调实现。实现类似BroadcastReceiver/RxBus/EventBus等的消息事件传递功能,用于在Activity/Fragment/Service之间的消息传递通讯。
Stars: ✭ 116 (+141.67%)
Mutual labels:  eventbus
vxrifa
Utility library for Vert.X that allows using strong-typed interfaces in communication through EventBus
Stars: ✭ 15 (-68.75%)
Mutual labels:  eventbus
vertx-vue-keycloak
This repo holds the source codes for the Medium Article "Vert.x + VueJS + OAuth2 in 5 steps"
Stars: ✭ 20 (-58.33%)
Mutual labels:  eventbus
react-click-away-listener
🐾 Tiny React Click Away Listener built with React Hooks
Stars: ✭ 131 (+172.92%)
Mutual labels:  event-handler
transceiver
Channel based event bus with request/reply pattern, using promises. For node & browser.
Stars: ✭ 25 (-47.92%)
Mutual labels:  event-bus
ontology-eventbus
The Go Language Implementation of Ontology Actor Model
Stars: ✭ 24 (-50%)
Mutual labels:  eventbus
IpcEventBus
Faster than Intents and easier than AIDLs.
Stars: ✭ 35 (-27.08%)
Mutual labels:  eventbus
Weather-Guru-MVP
Sample Material-design Android weather application build with MVP architectural approach using Dagger2, RxJava2, Retrofit2, Event-Bus, GreenDao, Butterknife, Lottie etc.
Stars: ✭ 15 (-68.75%)
Mutual labels:  event-bus
hertzy
Event bus channel
Stars: ✭ 48 (+0%)
Mutual labels:  eventbus
microservice-architecture-quick-start
Demonstrates how to build a Microservices Architecture using the C # language and the ASP.NET Core environment.
Stars: ✭ 16 (-66.67%)
Mutual labels:  eventbus
DelphiEventBus
Implementation of event bus pattern for Delphi XE
Stars: ✭ 32 (-33.33%)
Mutual labels:  eventbus
Alpine
Basic event system framework using functional interfaces
Stars: ✭ 79 (+64.58%)
Mutual labels:  eventbus
LiteBus
LiteBus is an easy-to-use and ambitious in-process mediator providing the foundation to implement CQS. It is implemented with minimum reflection usage and streamable query support.
Stars: ✭ 20 (-58.33%)
Mutual labels:  eventbus
MASA.BuildingBlocks
Building blocks of the MASA Stack, provides a unified interface standard for MASA Contrib's implementation specifications and process connector.
Stars: ✭ 119 (+147.92%)
Mutual labels:  eventbus
mvp4g
A framework to build a gwt application the right way
Stars: ✭ 29 (-39.58%)
Mutual labels:  eventbus
reacted
Actor based reactive java framework for microservices in local and distributed environment
Stars: ✭ 17 (-64.58%)
Mutual labels:  eventbus
telephone-ts
Telephone-ts: The "Event Emitter-less" TypeScript Event Architecture.
Stars: ✭ 22 (-54.17%)
Mutual labels:  eventbus
ReactiveBus
🚍 Reactive Event Bus for JVM (1.7+) and Android apps built with RxJava 2
Stars: ✭ 17 (-64.58%)
Mutual labels:  eventbus

react-native-event-bus

release PRs Welcome NPM version License MIT

Event bus for react native, cross-interface communication solution, it works on iOS and Android.

Content

Installation

  • 1.Run npm i react-native-event-bus --save
  • 2.import EventBus from 'react-native-event-bus'

Getting started

Add react-native-event-bus to your js file.

import EventBus from 'react-native-event-bus'

Inside your component's render method, use CheckBox:

fireEvent

EventBus.getInstance().fireEvent("your event name", {
    ...params
})

//

addListener

componentDidMount() {
    EventBus.getInstance().addListener("your event name", this.listener = data => {
        // handle the event
    })
}

componentWillUnmount() {
    EventBus.getInstance().removeListener(this.listener);
}

Contribution

Issues are welcome. Please add a screenshot of bug and code snippet. Quickest way to solve issue is to reproduce it on one of the examples.

Pull requests are welcome. If you want to change API or making something big better to create issue and discuss it first.


MIT Licensed

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].