@gaopeng123/hooks.use-effect-once-in-strict-mode
TypeScript icon, indicating that this package has built-in type declarations

0.7.10-alpha.0 • Public • Published

useEffectOnceInStrictMode

处理react18某些场景下,需要屏蔽掉StrictMode模式下执行俩次的场景,保证开发环境和生产环境只执行一次,并兼容react17

在线demo

Usage

useEffectOnceInStrictMode(()=> {}, []);

Readme

Keywords

Package Sidebar

Install

npm i @gaopeng123/hooks.use-effect-once-in-strict-mode

Weekly Downloads

22

Version

0.7.10-alpha.0

License

MIT

Unpacked Size

6.72 kB

Total Files

9

Last publish

Collaborators

  • gaopeng123