Resist the temptation to modify a component’s prototype (or otherwise mutate it) inside a HOC. The expression in below example invokes the shape() and area() method, using the len and bre value as the argument.

And because it’s a pure function, it’s composable with other HOCs, or even with itself. For example, we can create an App component that renders Welcome many times: For example,