@giteeteam/proxima-sdk-js
v0.7.1
Published
proxima-sdk-js
Downloads
32
Keywords
Readme
proxima-sdk-js
Install
yarn add @giteeteam/proxima-sdk-js
Build
yarn build
Use
// execute event
import createProximaSdk from '@giteeteam/proxima-sdk-js';
const proxima = createProximaSdk()
proxima.execute('event', params)
// execute event singleton
import {proximaSdk} from '@giteeteam/proxima-sdk-js';
proximaSdk.execute('event', params)
// use listen with react hooks
import {useListener} from '@giteeteam/proxima-sdk-js';
useListener('event', (params) => {
// do something
})
说明
通过发布订阅机制,在proxima内部进行通讯,一般来说只能在proxima内部使用,插件不能使用,插件要使用@giteeteam/plugin-sdk