12c83fb721
* Adding native-url package * Bumping native-url version * Upgrading native-url * Logging stats object for debugging * Logging stats object for debugging * Adding try catch to the error lines * Experimenting with regex * Experimenting with regex * Experimenting with regex * Testing regex changes * Fixing defer-script test case to not include polyfill.js * Meging changes with existing polyfill work * Bumping version * adjust webpack config * Reduce size in size test * Remove 1kb from legacy * Bumping native-url version, includes fix for IE11 * Update lock file * Updating native-url, fixes issue on IE11 * Fix sourcemap being added in document * Adding Router as an app level dep. Fixes Router not being added as a dep to pages without Link when granularChunks is enabled * Fix typescript error
23 lines
421 B
JavaScript
23 lines
421 B
JavaScript
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
|