年后第一周用 React Hooks 重构了两个项目并把总结记录了下来。总结了重构流程和技巧,还有一些遇到的坑和建议,具体可以用“梯子”看
I ’ ve completely rewritten two projects with React Hooks, here is the good and the ugly.
Table of Contents:
- Introducing React Hooks resources
- The benefit you can get from React Hooks
- APIs you ’ ll be frequently used
- Get started
-
- Update ReactJS
-
- Install the ESLint Plugin
-
- Turn a Class Component into a React Function with React Hooks
-
- Let ’ s do one more refactoring
-
- How about integrating with third-party libraries?
-
- Fix code minify issue
- Summary
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/537621
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.