Files
sweet/tests/fixture/islands/StringEventIsland.tsx
T

10 lines
296 B
TypeScript

export default function StringEventIsland() {
return (
<button // @ts-ignore - we don't officialy recommend this, but lots of
// apps pre Fresh 1.2 use string based click handlers.
onClick="document.querySelector('p').textContent = 'it works'">
click me
</button>
);
}