hooks
hooks copied to clipboard
fix: optimize useRequest to avoid too many repeated rerender (#2031)
🤔 This is a ...
- [ ] New feature
- [x] Bug fix
- [ ] Site / documentation update
- [ ] Demo update
- [ ] TypeScript definition update
- [ ] Bundle size optimization
- [ ] Performance optimization
- [ ] Enhancement feature
- [ ] Internationalization
- [ ] Refactoring
- [ ] Code style optimization
- [ ] Test Case
- [ ] Branch merge
- [ ] Other (about what?)
🔗 Related issue link
fix: https://github.com/alibaba/hooks/issues/2031
💡 Background and solution
📝 Changelog
Language | Changelog |
---|---|
🇺🇸 English | fix: optimize useRequest to avoid too many repeated rerender |
🇨🇳 Chinese | 优化useRequest避免配置相同cacheKey时过多重复渲染 |
☑️ 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
加个测试用例?
加个测试用例?
有加测试用例,测试用例有什么需要调整吗?
有量化的性能收益吗?
对于mutate的场景下如果mutate传入的对象和原先对象使用===判断返回true的情况,会导致其他cacheKey不会更新