acdlite / recompose

A React utility belt for function components and higher-order components.
MIT License
14.76k stars 1.26k forks source link

Suggest alternative to branch(), renderComponent(), renderNothing(), compose(), etc #828

Open venil7 opened 3 years ago

venil7 commented 3 years ago

So the author @acdlite of this wonderful library suggests that it has now been made deprecated, and does not recommend it to be used in any new projects. Main reason - similar functionality exists in React Hooks. And if for many HOCs in this library this is the case, useState, useReducer,useContext, etc - I don't think hooks fully replace branching/composition HOCs like branch, renderComponent and compose. Hooks are not full replacements for HOCs, and vice versa. And as far as I know HOCs are not considered harmful.

I'm looking for alternative library that implements similar branching/composing HOCs or a statement from authors that it is still safe to add this dependency to new projects.