Extracting Logic from React Components
By looking through our components and finding standalone functions that we can pull out, we greatly simplify our component whilst increasing our test coverage and clarity of our application greatly. By pulling the functions into their own modules you are forced to consider which props are needed and how your function will work. It makes code clearer, it's easier to see which props are used where and it means as your business logic gets more complex you can test it without having to get your UI components involved.