React Button Onclick Event Typescript Vs Nodejs