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

react hook 使用总结 #68

Open
xiaochengzi6 opened this issue Nov 29, 2022 · 0 comments
Open

react hook 使用总结 #68

xiaochengzi6 opened this issue Nov 29, 2022 · 0 comments

Comments

@xiaochengzi6
Copy link
Owner

xiaochengzi6 commented Nov 29, 2022

react hook 的入门很简单,但规范的使用 hook 以及优化 hook 都需要去了解其原理和特性才行

react hook 使用规范

react hook 的特性有那些

该如何写好或用好 hook

参考文章

  1. 理解 React Hooks 心智模型:必须按顺序、不能在条件语句中调用的规则
  2. 打破 React Hook 必须按顺序、不能在条件语句中调用的枷锁
  3. 为什么顺序调用对 React Hooks 很重要!
  4. 判断中改变状态-案例
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

No branches or pull requests

1 participant