How to setState within React’s recompose’s lifecycle method?

Posted by Jessica Taylor | Updated on

Want to setState within React’s recompose’s lifecycle method? If you move the lifecycle method after the withState methods, you have access to the setters by accessing this.props.setterFunction. In my case, here is the solution I was looking for:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers