react-chaos icon indicating copy to clipboard operation
react-chaos copied to clipboard

React hooks

Open EladBezalel opened this issue 5 years ago • 2 comments

Looks like a really nice project!

I think having a useChaos hook can be really useful and will also won't encapsulate the wrapped component

EladBezalel avatar Jul 28 '19 08:07 EladBezalel

@EladBezalel I agree, this is a good idea. I'll add it to the roadmap. Thanks for sharing!

jchiatt avatar Sep 07 '19 23:09 jchiatt

@EladBezalel @jchiatt It seems reasonable because of hooks using everywhere, but I can't imagine how I would implement chaos with hooks in my project. Because with HOC, we can change logic of the whole child component, but can we do this with hook? And will it be clear enough to not write boilerplate condition for render every time?

Honestly, I can't even imagine about using this with renderProps pattern because we don't need any returnable value from chaos

darotar avatar Sep 14 '19 08:09 darotar