-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUseRefHook.tsx
More file actions
49 lines (44 loc) · 1.09 KB
/
UseRefHook.tsx
File metadata and controls
49 lines (44 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import InfiteScrollView from "./component/InfiniteScrollView";
import InfiteScrollViewCorrected from "./component/InfiniteScrollViewCorrected";
import ListComponent from "./component/ListComponent";
export interface ReactUseStateHooksProps {}
export default function ReactUseRefHooks(props: ReactUseStateHooksProps) {
return (
<div className="flex-row justify-normal bg-cover m-5 outline-sky-600">
<Row1 />
<Row2 />
<Row3 />
</div>
);
}
function Row1() {
return (
<>
<div className="m-4 py-2 text-lg font-mono">
1. List scroll component with useRef hook
</div>
<ListComponent />
</>
);
}
function Row2() {
return (
<>
<div className="m-4 py-2 text-lg font-mono">
2. Infinite List implementation using the useRef hook.
</div>
<InfiteScrollView />
</>
);
}
function Row3() {
return (
<>
<div className="m-4 py-2 text-lg font-mono">
3. Infinite list implementation using the useRef and UseReducer to
correct the loading.
</div>
<InfiteScrollViewCorrected />
</>
);
}