Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace lodash/isEqual with react-fast-compare #2458

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

guoyunhe
Copy link
Contributor

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • 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

💡 Background and solution

react-fast-compare 提供了与 lodash/isEqual 相同的能力,但是体积更小,性能快了数倍。

image

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

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

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

@liuyib
Copy link
Collaborator

liuyib commented Feb 26, 2024

@li-jia-nan @hchlq @miracles1919 @crazylxr
这个有必要替换吗?性能是提高了,但是不清楚会不会有潜在的问题,没用过这个库

@li-jia-nan
Copy link
Collaborator

@li-jia-nan @hchlq @miracles1919 @crazylxr 这个有必要替换吗?性能是提高了,但是不清楚会不会有潜在的问题,没用过这个库

我也没用过这个

@crazylxr
Copy link
Collaborator

v4 再换吧,先 hold 一下

@crazylxr crazylxr added the v4 label Feb 27, 2024
@guoyunhe
Copy link
Contributor Author

@liuyib antd-mobile 已经换了,目前没有发现问题 https://github.com/ant-design/ant-design-mobile/blob/master/package.json#L33

@crazylxr
Copy link
Collaborator

那就整

@crazylxr crazylxr merged commit e55414b into alibaba:master Feb 29, 2024
8 checks passed
@liuyib liuyib removed the v4 label Mar 1, 2024
raotaohub pushed a commit to raotaohub/hooks that referenced this pull request Mar 28, 2024
* refactor: replace lodash/isEqual with react-fast-compare

* chore: update lock

---------

Co-authored-by: 云泥 <[email protected]>
crazylxr added a commit that referenced this pull request Apr 11, 2024
* refactor: replace lodash/isEqual with react-fast-compare (#2458)

* refactor: replace lodash/isEqual with react-fast-compare

* chore: update lock

---------

Co-authored-by: 云泥 <[email protected]>

* refactor(useRafInterval): optimize useEffect cleanup fn (#2426)

* fix(useAntdTable): 修复动态设置 ready 失效的 bug (#2489)

* refactor(useLockFn): catch to finally (#2421)

* refactor(useLockFn): catch to finally

* refactor(useLockFn): keep the throw e

* refactor(createEffectWithTarget): the first parameter is old-deps (#2431)

* fix(useCountDown): targetDate resets leftTime (#2346)

* chore: update version

---------

Co-authored-by: Guo Yunhe <[email protected]>
Co-authored-by: ice <[email protected]>
Co-authored-by: guaijie <[email protected]>
Co-authored-by: joe-leong <[email protected]>
Co-authored-by: 潇见 <[email protected]>
crazylxr added a commit that referenced this pull request Apr 22, 2024
* refactor: replace lodash/isEqual with react-fast-compare (#2458)

* refactor: replace lodash/isEqual with react-fast-compare

* chore: update lock

---------

Co-authored-by: 云泥 <[email protected]>

* refactor(useRafInterval): optimize useEffect cleanup fn (#2426)

* fix(useAntdTable): 修复动态设置 ready 失效的 bug (#2489)

* refactor(useLockFn): catch to finally (#2421)

* refactor(useLockFn): catch to finally

* refactor(useLockFn): keep the throw e

* refactor(createEffectWithTarget): the first parameter is old-deps (#2431)

* fix(useCountDown): targetDate resets leftTime (#2346)

* chore: update version

* fix(type): fixed up some types that are non-standard and errors on `useExteneral` hook (#2508)

* fix(type): fixed up some types that are non-standard and errors on `useExternal` hook

* style: format

* refactor: simplify

---------

Co-authored-by: liuyib <[email protected]>

* feat(useStoage): listen to `storage` event (#2298)

* feat: sync `storage` state

* chore: update test case

* refactor: replace StorageEvent to CustomEvent, and add listenStorageChange param

* test: revert case in useSessionStorage

* docs: modify docs and demo

* test: add case for 'enable' parameter

* test: remove unnecessary code

---------

Co-authored-by: liuyib <[email protected]>

* chore(useLatest): add a default state for comparison in useLatest demo (#2523)

* feat(useSelections): support object array (#2485)

* feat(useSelections): support object array

* fix: solve error

* 修复 useAntdTable Params 的类型问题 (#2377)

* fix(useAntdTable): change Params filter to filters

* docs(useAntdTable): change Params filter to filters

* fix(useVirtualList): get correct offset when itemHeight is fixed (#2279)

Co-authored-by: huangcheng <[email protected]>

---------

Co-authored-by: Guo Yunhe <[email protected]>
Co-authored-by: ice <[email protected]>
Co-authored-by: guaijie <[email protected]>
Co-authored-by: joe-leong <[email protected]>
Co-authored-by: 潇见 <[email protected]>
Co-authored-by: Darwish <[email protected]>
Co-authored-by: vaakian <[email protected]>
Co-authored-by: shanyue <[email protected]>
Co-authored-by: Conor <[email protected]>
Co-authored-by: echo <[email protected]>
Co-authored-by: huangcheng <[email protected]>
crazylxr added a commit that referenced this pull request May 13, 2024
* refactor: replace lodash/isEqual with react-fast-compare (#2458)

* refactor: replace lodash/isEqual with react-fast-compare

* chore: update lock

---------

Co-authored-by: 云泥 <[email protected]>

* refactor(useRafInterval): optimize useEffect cleanup fn (#2426)

* fix(useAntdTable): 修复动态设置 ready 失效的 bug (#2489)

* refactor(useLockFn): catch to finally (#2421)

* refactor(useLockFn): catch to finally

* refactor(useLockFn): keep the throw e

* refactor(createEffectWithTarget): the first parameter is old-deps (#2431)

* fix(useCountDown): targetDate resets leftTime (#2346)

* chore: update version

* fix(type): fixed up some types that are non-standard and errors on `useExteneral` hook (#2508)

* fix(type): fixed up some types that are non-standard and errors on `useExternal` hook

* style: format

* refactor: simplify

---------

Co-authored-by: liuyib <[email protected]>

* feat(useStoage): listen to `storage` event (#2298)

* feat: sync `storage` state

* chore: update test case

* refactor: replace StorageEvent to CustomEvent, and add listenStorageChange param

* test: revert case in useSessionStorage

* docs: modify docs and demo

* test: add case for 'enable' parameter

* test: remove unnecessary code

---------

Co-authored-by: liuyib <[email protected]>

* chore(useLatest): add a default state for comparison in useLatest demo (#2523)

* feat(useSelections): support object array (#2485)

* feat(useSelections): support object array

* fix: solve error

* 修复 useAntdTable Params 的类型问题 (#2377)

* fix(useAntdTable): change Params filter to filters

* docs(useAntdTable): change Params filter to filters

* fix(useVirtualList): get correct offset when itemHeight is fixed (#2279)

Co-authored-by: huangcheng <[email protected]>

* fix(createUseStorageState): invoke setState twice (#2532)

* fix: 🐞 every add default value (#2529)

* feat(useDynamicList): add `batchRemove` method (#2340)

* feat: useDynamicList添加批量删除

* fix: list key

* ci: add case for batchRemove

* chore: add batchRemove to demo

* fix: better warn

* test: update

---------

Co-authored-by: xiaozisong <[email protected]>
Co-authored-by: liuyib <[email protected]>

* feat(useSelections): add clearAll result (#2357)

* feat(useSelections): add clearAll result

* docs: update docs and code style

* refactor: resolve conflict

* docs: update

---------

Co-authored-by: liuyib <[email protected]>

* test(useSelections): fix test case error (#2536)

* test: fix case

* style: rename

---------

Co-authored-by: Guo Yunhe <[email protected]>
Co-authored-by: ice <[email protected]>
Co-authored-by: guaijie <[email protected]>
Co-authored-by: joe-leong <[email protected]>
Co-authored-by: 潇见 <[email protected]>
Co-authored-by: Darwish <[email protected]>
Co-authored-by: vaakian <[email protected]>
Co-authored-by: shanyue <[email protected]>
Co-authored-by: Conor <[email protected]>
Co-authored-by: echo <[email protected]>
Co-authored-by: huangcheng <[email protected]>
Co-authored-by: 左耳咚 <[email protected]>
Co-authored-by: shawn <[email protected]>
Co-authored-by: xiaozisong <[email protected]>
Co-authored-by: lich-yoo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants