hooks
hooks copied to clipboard
refactor/useEventEmitter 支持指定名称订阅,支持订阅方法结果返回,支持同步调用异步订阅方法,支持订阅方法添加使用依赖项
🤔 This is a ...
- [ ] New feature
- [ ] Bug fix
- [ ] Site / documentation update
- [ ] Demo update
- [ ] TypeScript definition update
- [ ] Bundle size optimization
- [ ] Performance optimization
- [ ] Enhancement feature
- [ ] Internationalization
- [x] Refactoring
- [ ] Code style optimization
- [ ] Test Case
- [ ] Branch merge
- [ ] Other (about what?)
🔗 Related issue link
💡 Background and solution
背景: 原有hook无法满足订阅指定名称方法.不支持同步调用异步订阅方法。不支持传递依赖项,不支持调用订阅方法后返回结果.
解决方案: 重构内部代码.兼容原来的版本.添加新的支持.
📝 Changelog
Language | Changelog |
---|---|
🇺🇸 English | Support a specified name subscription call, synchronous invocation of asynchronous subscription methods, real-time access to the return result of subscription methods, subscription methods support passing dependencies |
🇨🇳 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