Question regarding Alpine.js

I need to implement a third party newsletter subscriber form and those docs tell me, that when I want a custom success callback, I would need to implement this:
<script type="text/javascript">
function mySubscribeSuccess( form )
{
    alert( "You are subscribed!" );
    return false;
}
</script>

Know I would like to set my alpine.js object to true: x-data="{ customSubscribed: false }" Is that possible with alpine?
Was this page helpful?