Search code examples
javascriptreactjsvue.jsamp-html

how to convert react/vue.js events in amp


If my project UI content react/vue.js and I want to create amp page after added all amp-boilerplate.

it is not working with the event it gives error likes below

The attribute 'v-on:click' may not appear in tag 'li'. The attribute 'v-show' may not appear in tag 'ul'.

please let me know how to convert it.


Solution

  • Yes you can use amp-bind which is allows you to add custom stateful interactivity to your AMP pages & amp-state

    on="tap:AMP.setState({'abc': 'xyz'})"