DEV Community

loading...

onClick event in Strapi doesn't work

annika12 profile image Annika-12 ・1 min read

I am working with Strapi, react.js and Apollo. My problem is that I have implemented the following event in the editor of Strapi:

Alt Text

onclick="window.trackDownload('mapal_mitte', 'MAPAL_Neuheiten-2021_EN')"

but the onclick event raises the following error :

Uncaught Error: Minified React error #231;

full message:

Expected onClick listener to be a function, instead got a value of string type.

Does anyone know what I did wrong?

Discussion (0)

pic
Editor guide