Vlad Fratila

Hey, thanks for the feedback.

I don’t see how displaying a status message is state that needs to be handled by the component. That state in this case is a (practically) arbitrary string in the component props.

My goal here is to show that you don’t need to write a class based component, or your own higher-order component, to use component lifecycle hooks with react-router 4. Additionally, I find functional components much more convenient in tests, and recompose allows you to abstract a lot of the common patterns that make tests more complex leaving you with a simple, pure component that you can (mostly) test with snapshots.

It’s certainly not the perfect example of how to use recompose or it’s true strengths, but to say having a simple string in the props makes a component truly stateful seems like a stretch to me.

Show your support

Clapping shows how much you appreciated Leath Cooper’s story.