MCPcopy
hub / github.com/preactjs/preact / Editable

Function Editable

test/browser/render.test.jsx:1054–1064  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1052 // See https://github.com/preactjs/preact/issues/2691
1053
1054 function Editable() {
1055 const [value, setValue] = useState('Hello');
1056
1057 return (
1058 <div
1059 contentEditable
1060 dangerouslySetInnerHTML={{ __html: value }}
1061 onInput={e => setValue(e.currentTarget.innerHTML)}
1062 />
1063 );
1064 }
1065
1066 render(<Editable />, scratch);
1067

Callers

nothing calls this directly

Calls 2

useStateFunction · 0.90
setValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…