File size: 421 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
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
|