Converts a React class component to a stateless functional component.