score:1

Accepted answer

you are getting that error because you are exporting clockimage() which call the function first then exports the returned value, and in index.js react fails to render clockimage because it's not a component.

you need to export clockimage instead:

export default clockimage;

a side note: it's not a good idea to create/render a component just for the sole purpose of changing the style.


Related Query

More Query from same tag