Helpers in stateless functional components

Posted by Jessica Taylor | Updated on

Helpers in stateless functional components

If you intend to reuse the helper function, put it outside the stateless component function, either in same file or another, and export it:

Otherwise, it’s up to you to decide – whatever makes sense to keep things organized.


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