Download next.js/test/integration/chunking/pages/page2.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 421 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/chunking/pages/page2.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/integration/chunking/pages/page2.js
-
curl -L -o page2.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/chunking/pages/page2.js
421 Bytes
| import { useState, useEffect } from 'react' | |
| import _ from 'lodash' | |
| import dynamic from 'next/dynamic' | |
| const One = dynamic(() => import('../components/one')) | |
| const Page = () => { | |
| const [str, setStr] = useState('rad') | |
| useEffect(() => { | |
| setStr(_.pad(str, 7, '_')) | |
| }, [str]) | |
| console.log(_) | |
| return ( | |
| <div> | |
| page2 | |
| <p id="padded-str">{str}</p> | |
| <One /> | |
| </div> | |
| ) | |
| } | |
| export default Page | |