Open KELEN opened 9 months ago
https://www.kelen.cc/posts/react-hoc-vs-render-prop
高阶组件就是一个函数,接收一个组件,返回一个新的组件,可以用来扩展传入的组件的功能。在高阶组件之前通过mixins来实现相同的功能,官方不推荐使用mixins
https://www.kelen.cc/posts/react-hoc-vs-render-prop
高阶组件就是一个函数,接收一个组件,返回一个新的组件,可以用来扩展传入的组件的功能。在高阶组件之前通过mixins来实现相同的功能,官方不推荐使用mixins