JSFiddle - React, Tailwind, and code Playground
by jakie8
HTML
<a href="http://google.com/" data-foo="bar">Click Me</a>
JavaScript
document.addEventListener('click', function(e){
var el = e.srcElement;
if(el.dataset && el.dataset.foo){
e.preventDefault();
alert(el.dataset.foo);
}
});