an example of using react-component with component