JSFiddle - React, Tailwind, and code Playground

HTML

<button onclick="addContact(1);">Go</button>

JavaScript

function addContact(id) {
    refreshContactList();
    // You can also pass arguments if you need to
    // refreshContactList(id);
}

function refreshContactList() {
    alert('Hello World');
}