react-code-dataset / next.js /test /development /app-dir /strict-mode-enabled-by-default /app /page.js
Download next.js/test/development/app-dir/strict-mode-enabled-by-default/app/page.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 241 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/strict-mode-enabled-by-default/app/page.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/development/app-dir/strict-mode-enabled-by-default/app/page.js
-
curl -L -o page.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/strict-mode-enabled-by-default/app/page.js
241 Bytes
| 'use client' | |
| import { useEffect, useState } from 'react' | |
| let i = 0 | |
| export default function Page() { | |
| const [, forceUpdate] = useState(0) | |
| useEffect(() => { | |
| console.log('user:log', i++) | |
| forceUpdate() | |
| }, []) | |
| return <p>{i}</p> | |
| } | |