xinchanghao / one-day-in-the-future

有朝一日,起飞...
2 stars 1 forks source link

React为什么需要Hook #2

Open pzli opened 4 years ago

pzli commented 4 years ago

1、Component非UI逻辑复用困难 react15是高阶组件或者renderProps

2、组件的生命周期函数不适合side effect逻辑的管理

3、不友好的Class Component this指向问题

参考链接