Hi Jurjen,
Most people find building a UI in a JavaScript framework like React or Angular harder than building the UI in Uniface DSP component (which binds the data to the HTML by ID and does all the synchronization, as well as providing server-side triggers and JavaScript webtriggers), but if you want to do that you can. Your question is more about JavaScript/React however.
In vanilla JavaScript you can add an onClick event to a button in a number of ways, e.g.
var btn = document.getElementById("button");
btn.onclick = function() {
// your code here
}
or use the onClick attribute to call a method in your JavaScript code rather than the anonymous function I declared above, e.g.
<button onClick="getEmployees();">Show Employees</button>
Your JavaScript code (e.g. getEmployees) would then use the Uniface API to instantiate components, activate operations, and/or directly access data: APIs: JavaScript (uniface.com). I addressed the question of how to include the Uniface JavaScript API in response to one of your earlier questions.
Regards,
David