acdlite / recompose

A React utility belt for function components and higher-order components.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: how to convert hoc to hooks

xiaoxiangmoe opened this issue · comments

(:з」∠) some hoc hijack rendering,like branch

I don't think this question will have a short answer, but on should hope! 😄

commented

React Hook is quite different to React lifecycle which is usually used in HOCs, so there is no trivial way to convert a HOC to a hook. And, beacuse hooks live in functional components, they can not hijack rendering like branch().