DEV Community

Discussion on: Creating React components without this. #nothis

Collapse
 
romanholovin profile image
Roman Holovin

recompose + @hocs/with-lifecycle provides more smooth solution than this one :)

Collapse
 
joelnet profile image
JavaScript Joel

I will totally agree with you on this. These both provide a very elegant functional design and if I start a project from scratch, I'll probably go with one of these. Sometimes the the code style is out of our control and not all developers are up to speed with FP.

The intent of <NoThis.Component /> is not to push an FP paradigm. It's only purpose is to promote this to a function argument.

I wouldn't say recompose is a better solution than @hocs/with-lifecycle or vice versa. They both have their place. At the same time I feel like this library also has it's place.

Cheers!