rsnext/test/integration/chunking/pages/page2.js
Joe Haddad 18a9c7e371
Improve linting rules to catch more errors (#9374)
* Update `packages/`

* Update examples

* Update tests

* Update bench

* Update top level files

* Fix build

* trigger
2019-11-10 19:24:53 -08:00

25 lines
489 B
JavaScript

import { useState, useEffect } from 'react'
import _ from 'lodash'
import dynamic from 'next/dynamic'
import Link from 'next/link'
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 />
<Link href="/page3">Page3</Link>
</div>
)
}
export default Page