I have a React component that displays styled text, and I want to have it load a network resource, listen for WebSocket input, and display notifications. In order to do this, I write Higher Order Component wrapper functions for each of these: withResource
, withSocket
, and withNotifications
.
When exporting the component, is this correct?
class TextComponent extends React.Component {
...
}
export default withResource(withSocket(withNotifications(TextComponent)))