Calling Javascript function on Click

Hi, I am trying to use javascript to log a click event but I can’t seem to make it happen no matter what I try. I am an absolute beginner and I’m sure I am (obviously) doing something wrong here. Can anybody lead me in the right direction? Thanks in advance.

Here is what I have
It results in the initial ‘handled1’ being logged but not the function with ‘handled2’.

Though the button does respond visually to a click, the function isn’t executed.

	function f1(){

	<Button Text="Click Me" Clicked="{f1}" />
module.exports = {
	f1: f1

That done the trick thank you! I should have known as {f1} is in the same shortcode format which I had noticed but this solution never came to mind. Thanks again.

@Horchata: yes and no. The arguments are implicitly the data context you are clicking on, so the answer depends on your particular use case.

Please explain what you are trying to do in a new forum thread, share some code to show what you have tried so far and we’ll take it from there.