Any global onClick function in react?
0
When we develop the website in jQuery , we can do something like this. $('button').click(function(){ //Add Google Analytics }) But in react, we make different components with styled-component I don't want to add the onClick function in each page and components. Can I add something like jQuery click function?
javascript reactjs styled-components
share | improve this question
asked Dec 28 '18 at 3:32
MeSking
3 2
2
...