Skip to content
Dashboard

Link to headingStatic Export Support

next export

Link to headingDynamic Import Support

const moment = import('moment')
setTimeout(function() {
moment.then(moment => {
// Do something with moment
})
}, 15000)

Link to headingDynamic React Components

import dynamic from 'next/dynamic'
const DynamicComponent = dynamic(import('@components/hello'))
export default () => (
<div>
<Header />
<DynamicComponent />
<p>HOME PAGE is here!</p>
</div>
)

Loading a single component, dynamically.

import dynamic from 'next/dynamic'
const HelloBundle = dynamic({
modules: (props) => {
const components = {
Hello1: import('@components/hello1'),
Hello2: import('@components/hello2')
}
// you can add / remove components based on props
return components
},
render: (props, { Hello1, Hello2 }) => (
<div>
<h1>{props.title}</h1>
<Hello1 />
<Hello2 />
</div>
)
})
export default () => (
<HelloBundle title="Dynamic Bundle" />
)

Loading different components based on dynamic properties!

Link to headingMore Beautiful Errors

The gif shows a syntax error being hot reloaded with the new¬ colors.
The gif shows a syntax error being hot reloaded with the new¬ colors.

Link to headingImproved Hot Module Replacement

Link to headingHMR: Node.js 8.0 Support

You won’t be seeing this one again!
You won’t be seeing this one again!

Link to headingHMR: Navigating to Errors

We navigate to the index page with errors, fix them and watch¬ the page recover.
We navigate to the index page with errors, fix them and watch¬ the page recover.

Link to headingHMR: 404 to Error to Success

After we create the page, we introduce an error and then¬ promptly fix it.
After we create the page, we introduce an error and then¬ promptly fix it.

Link to headingHMR: Better Bad Returns

After the right type is returned, the page recovers¬ successfully.
After the right type is returned, the page recovers¬ successfully.

Link to headingHMR: Undefined Can Be a Function

We first make a syntax error, which recovers to a runtime error,¬ which recovers to the page.
We first make a syntax error, which recovers to a runtime error,¬ which recovers to the page.

Link to headingFaster: Serverless Ready

Link to headingSmaller: Optimized Core Bundles

Link to heading4.0 and Beyond