当前位置:网站首页>消息的订阅和发布
消息的订阅和发布
2022-07-26 13:36:00 【陈小同学】
下载pubsub-js
npm add pubsub-js
引用
import PubSub from 'pubsub-js'
发布消息
PubSub.publish('消息名称', 数据)
订阅消息
PubSub.subscribe('消息名称', (_, data) =>{
- _ 占位符
- data为数据
...
})
边栏推荐
- Comparator (interface between comparable and comparator)
- flutter多渠道打包运行
- 2022年,我们只用一个月就“送走”了这么多互联网产品
- Can I take your subdomain? Exploring Same-Site Attacks in the Modern Web
- B+ tree index use (6) leftmost principle -- MySQL from entry to proficiency (18)
- Photoshop (cc2020) unfinished
- 一笔画问题(中国邮递员问题)
- Familiarize you with the "phone book" of cloud network: DNS
- Niuke brush sql---2
- We were tossed all night by a Kong performance bug
猜你喜欢

3D modeling and rendering based on B é zier curve

LCL三相pwm整流器(逆变器)

终极套娃 2.0 | 云原生交付的封装

Photoshop(CC2020)未完

如何构建以客户为中心的产品蓝图:来自首席技术官的建议

天津市应急局与驻津央企签署协议深化应急联动机制建设

HCIP第十一天比较(BGP的配置、发布)

See you tomorrow at the industrial session of cloud intelligence technology forum!

Analysis on the current situation and optimization strategy of customer experience management in banking industry

我们被一个 kong 的性能 bug 折腾了一个通宵
随机推荐
Intercept the coordinate points (four point coordinates of the face frame) face image from the marked XML file and save it in the specified folder
如何构建以客户为中心的产品蓝图:来自首席技术官的建议
我们被一个 kong 的性能 bug 折腾了一个通宵
Time complexity and space complexity
[oauth2] v. oauth2loginauthenticationfilter
B+ tree index use (9) grouping, back to table, overlay index (21)
Sword finger offer (VII): Fibonacci sequence
B+ tree index use (6) leftmost principle -- MySQL from entry to proficiency (18)
Implementation of SAP ABAP daemon
终极套娃 2.0 | 云原生交付的封装
Abstract factory and its improvement examples
[flower carving hands-on] interesting and fun music visualization series small project (13) -- organic rod column lamp
B+ tree (3) clustered index, secondary index -- MySQL from entry to proficiency (XV)
LeetCode 217. 存在重复元素
天津市应急局与驻津央企签署协议深化应急联动机制建设
Win11+vs2019 configuration yolox
8 年产品经验,我总结了这些持续高效研发实践经验 · 研发篇
Codeforces round 810 (Div. 2) [competition record]
从标注好的xml文件中截取坐标点(人脸框四个点坐标)人脸图像并保存在指定文件夹
算法--连续数列(Kotlin)