hooks icon indicating copy to clipboard operation
hooks copied to clipboard

feat(useEventBus): support-new-way-publish-subscribe

Open xbw19975 opened this issue 10 months ago • 2 comments

[中文版模板 / Chinese template]

🤔 This is a New feature

🔗 Related issue link

#2533

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • [x] Doc is updated/provided or not needed
  • [x] Demo is updated/provided or not needed
  • [x] TypeScript definition is updated/provided or not needed
  • [x] Changelog is provided or not needed

#2533

xbw19975 avatar Apr 25 '24 10:04 xbw19975

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 25 '24 10:04 CLAassistant

新hook基于老的hook主要有以下几点 1.支持一对一发布订阅 2.支持订阅方法里使用state.通过依赖项保证值的最新 3.支持asyncEmit 等待一些异步方法 4.拆分原始类,支持hook方式使用 和 不在函数组件内订阅发布方法.例如utils.js内使用.

xbw19975 avatar Apr 25 '24 10:04 xbw19975