Document

Import

import SocketLocal from 'vn-native-js/socket-local';

Create

You can set listen event at anywhere and trigger at anywhere . SocketLocal.event.on(event_name,callback)

Params Description
event_name This is a key, you can set it by anything (String)
callback Callback function (func)

Emit

SocketLocal.event.emit(event_name,data)

Params Description
event_name This is a key of event
data String | Json