MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / onClick

Function onClick

playground-test/src/App.tsx:8–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6 const textareaRef = useRef<HTMLTextAreaElement>(null);
7
8 function onClick() {
9 if(!textareaRef.current) {
10 return ;
11 }
12
13 const res = transform(textareaRef.current.value, {
14 presets: ['react', 'typescript'],
15 filename: 'guang.tsx'
16 });
17 console.log(res.code);
18 }
19
20 const code = `import { useEffect, useState } from "react";
21

Callers

nothing calls this directly

Calls 1

transformFunction · 0.85

Tested by

no test coverage detected