The reason why I include checks for render, componentWillMount, etc. Is just for consistency. Now that you have mentioned it, I'm not sure if they are necessary at all.
The import in the last test file, it should be Auth.js. In my pet project everything lives in a container folder. You can check out the react-boilerplate repo, to see a more complete implementation of the same pattern.
Imho they aren't necessary and also do not make sense, since any reader like me would mistakingly read that this component expects props render, componentWillMount, which conflicts with React API.
The reason why I include checks for
render
,componentWillMount
, etc. Is just for consistency. Now that you have mentioned it, I'm not sure if they are necessary at all.The import in the last test file, it should be
Auth.js
. In my pet project everything lives in a container folder. You can check out thereact-boilerplate
repo, to see a more complete implementation of the same pattern.Imho they aren't necessary and also do not make sense, since any reader like me would mistakingly read that this component expects props
render
,componentWillMount
, which conflicts with React API.You are right, I've just edited the post and my source code.
Thanks for the feedback.