import { useState } from "react"; import "./CustomElement"; function App() { const [text, setText] = useState("Hello World"); const [counter, setCounter] = useState(0); const [checked, setChecked] = useState(false); return ( <>
setText(e.target.value)} /> setChecked(e.currentTarget.checked)} />
console.log("propFunction called", args)} onMyEvent={(str) => console.log("onEvent called", str)} my-first-attribute={"first-attribute-value " + text} my-second-attribute={"second-attribute-value " + text} />
); } export default App;