hooks icon indicating copy to clipboard operation
hooks copied to clipboard

fix: optimize useRequest to avoid too many repeated rerender (#2031)

Open YinDongFang opened this issue 1 year ago • 5 comments

[中文版模板 / Chinese template]

🤔 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

YinDongFang avatar Apr 27 '23 08:04 YinDongFang

加个测试用例?

li-jia-nan avatar Apr 29 '23 08:04 li-jia-nan

加个测试用例?

有加测试用例,测试用例有什么需要调整吗?

YinDongFang avatar May 04 '23 06:05 YinDongFang

有量化的性能收益吗?

kongmoumou avatar May 11 '23 02:05 kongmoumou

对于mutate的场景下如果mutate传入的对象和原先对象使用===判断返回true的情况,会导致其他cacheKey不会更新

komaedaXnagito avatar Jan 22 '24 09:01 komaedaXnagito