import * as React from \"react\"; import \"./App.css\"; import PageTwo from \"./components/PageTwo\"; export interface IPropsk { data?: Array&l
As @basarat said above, when you have something like button.onclick = thisFunction(); you are already calling that function. You may want to just assign that function but not to call it,
button.onclick = thisFunction();
so you would write like this button.onclick = thisFunction;.
button.onclick = thisFunction;