hooks icon indicating copy to clipboard operation
hooks copied to clipboard

Use `noop` instead of useEffect in useIsomorphicLayoutEffect

Open nghiepdev opened this issue 3 months ago • 5 comments

I believe this is equivalent when run server-side, but doesn't call into react so it's more efficient.

[中文版模板 / Chinese template]

🤔 This is a ...

  • [ ] New feature
  • [ ] Bug fix
  • [ ] Site / documentation update
  • [ ] Demo update
  • [ ] TypeScript definition update
  • [ ] Bundle size optimization
  • [ ] Performance optimization
  • [x] Enhancement feature
  • [x] Internationalization
  • [ ] Refactoring
  • [ ] Code style optimization
  • [ ] Test Case
  • [ ] Branch merge
  • [ ] Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 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

nghiepdev avatar Sep 19 '25 08:09 nghiepdev

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 19 '25 08:09 CLAassistant

npm i https://pkg.pr.new/ahooks@2859
npm i https://pkg.pr.new/@ahooksjs/use-url-state@2859

commit: 225fe16

pkg-pr-new[bot] avatar Sep 26 '25 07:09 pkg-pr-new[bot]

这个破坏原始 api 能力了吧

meet-student avatar Oct 11 '25 01:10 meet-student

这个破坏原始 api 能力了吧

It doesn’t break the original api. I referenced changes from the use-isomorphic-layout-effect package.

nghiepdev avatar Oct 12 '25 01:10 nghiepdev

这个破坏原始 api 能力了吧

It doesn’t break the original api. I referenced changes from the use-isomorphic-layout-effect package.

your are right

meet-student avatar Oct 12 '25 08:10 meet-student