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

Function App

hook-test/src/App4.tsx:3–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { useEffect, useRef } from "react";
2
3function App() {
4 const inputRef = useRef<HTMLInputElement>(null);
5
6 useEffect(() => {
7 inputRef.current?.focus();
8 });
9
10 return (
11 <div>
12 <input ref={inputRef}></input>
13 </div>
14 );
15}
16
17export default App;

Callers

nothing calls this directly

Calls 1

useEffectFunction · 0.90

Tested by

no test coverage detected