Though this is not the best approach to the problem, I do need my React app to interact with jQuery till I come up with a better solution.
In the HTML page for my entry point component, I have a simple jQuery listener -- see below:
<html>
... // Omitted for brevity
<body>
... // Omitted for brevity
<script type="text/javascript">
$(".my-class").on("click", function() {
debugger;
// We'll do something here
})
</script>
</body>
</html>
Then, in my dumb component, I have the following but it's not working. When I click my button, I'm not hitting the break point I set in the listener.
const MyComponent = () => {
return(
<div>
<a href="#" className="btn-primary my-class">Click Me!</a>
</div>
);
}
export default MyComponent;
Any idea how I can get this to work?