Refactor React components to stateless functions
mateoclarke opened this issue · 2 comments
mateoclarke commented
We have a few components that aren't making use of React's component state or lifecycle methods. These components should be refactored to use the stateless functional pattern if they are purely for rendering DOM elements and not managing state. This will improve performance and clean up our code.
mateoclarke commented
We've already been doing this as we go back through and touch the file in question, but just read another article that makes the case about why this is good:
http://reactingonrails.com/prefer-functional-components/
ifsimicoded commented
Closing as all current components that should be stateless are.