Download next.js/test/.stats-app/pages/withRouter.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 336 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/.stats-app/pages/withRouter.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/.stats-app/pages/withRouter.js
-
curl -L -o withRouter.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/.stats-app/pages/withRouter.js
336 Bytes
| import { withRouter } from 'next/router' | |
| function useWithRouter(props) { | |
| return <div>I use withRouter</div> | |
| } | |
| // we add getServerSideProps to prevent static optimization | |
| // to allow us to compare server-side changes | |
| export const getServerSideProps = () => { | |
| return { | |
| props: {}, | |
| } | |
| } | |
| export default withRouter(useWithRouter) | |