Skip to content
#

frontend-web

Here are 452 public repositories matching this topic...

AboutFE
CodingMeUp
CodingMeUp commented Apr 22, 2020

目前已有的模式

逻辑复用在 React 中是经历了很长的一段发展历程的, mixin -> HOC & render-props -> Hook

逻辑重用

相信很多接触过 React Hook 的小伙伴已经对这种模式下组件间逻辑复用的简单性有了一定的认知,自从 React 16.7 发布以来,社区涌现出了海量的 Hook 轮子,以及主流的生态库 react-router,react-redux 等等全部拥抱 Hook,都可以看出社区的同好们对于 Hook 开发机制的赞同。

其实组件逻辑复用在 React 中是经历了很长的一段发展历程的,mixin -> HOC & render-props -> Hook,mixin 是 React 中最早启用的一种逻辑复用方式,因为它的缺点实在是多到数不清(REACT是学院派前端库, mixin多了容易导致

Improve this page

Add a description, image, and links to the frontend-web topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the frontend-web topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.