当前位置:网站首页>消息的订阅和发布
消息的订阅和发布
2022-07-26 13:36:00 【陈小同学】
下载pubsub-js
npm add pubsub-js
引用
import PubSub from 'pubsub-js'
发布消息
PubSub.publish('消息名称', 数据)
订阅消息
PubSub.subscribe('消息名称', (_, data) =>{
- _ 占位符
- data为数据
...
})
边栏推荐
- Solution 5g technology helps build smart Parks
- [oauth2] v. oauth2loginauthenticationfilter
- B+ tree selection index (1) -- MySQL from entry to proficiency (22)
- B+ tree selection index (2) -- MySQL from entry to proficiency (23)
- Hcip day 11 comparison (BGP configuration and release)
- Official announcement! Edweisen group and Baidu xirang reached a deep co creation cooperation
- Feixin, which lasted 15 years and had 500million users, was completely dead
- .NET WebAPI 使用 GroupName 对 Controller 分组呈现 Swagger UI
- LeetCode 69. x 的平方根
- Niuke brush sql---2
猜你喜欢

周伟:寻找非共识性投资机会,陪伴延迟满足的创始团队

ROS2学习(1)ROS2简述

Comparison between SIGMOD function and softmax function

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

Multi objective optimization series 1 --- explanation of non dominated sorting function of NSGA2

Uncover the secret of white hat: 100 billion black products on the Internet scare musk away

How to write the introduction of GIS method journals and papers?

《Kotlin系列》之MVVM架构封装(kotlin+mvvm)

力扣------字符串中的单词数

HCIP第十二天笔记整理(BGP联邦、选路规则)
随机推荐
Unity中序列化类为json格式
Oom caused by improper use of multithreading
Dimension disaster dimension disaster suspense
Hcip day 11 comparison (BGP configuration and release)
Tupu 3D visual national style design | collision between technology and culture "cool" spark“
图扑 3D 可视化国风设计 | 科技与文化碰撞炫酷”火花“
The.Net webapi uses groupname to group controllers to render the swagger UI
TDSQL-C Serverless:助力初创企业实现降本增效
【C语言学习者必会的题目集锦1】巩固基础,稳步提高
估值15亿美元的独角兽被爆裁员,又一赛道遇冷?
This article explains the FS file module and path module in nodejs in detail
LeetCode 217. 存在重复元素
Hcip day 12 notes sorting (BGP Federation, routing rules)
飞盘,2022年“黑红”顶流
B+ tree index use (9) grouping, back to table, overlay index (21)
异步线程池在开发中的使用
LCL三相pwm整流器(逆变器)
Implementation of SAP ABAP daemon
Solve the problem that the remote host cannot connect to the MySQL database
The shell script in Jenkins fails to execute but does not exit by itself