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!
@xiaoxiangmoe maybe https://github.com/Synvox/rehook can be useful for you
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()
.