import React from 'react' import Router from 'next/router' import Header from '../components/Header' import Counter from '../components/Counter' import dynamic from 'next/dynamic' const DynamicComponent1 = dynamic(import('../components/hello1')) const DynamicComponent2WithCustomLoading = dynamic({ loader: () => import('../components/hello2'), loading: () => (
Loading caused by client page transition ...
) }) const DynamicComponent3WithNoSSR = dynamic({ loader: () => import('../components/hello3'), loading: () => (Loading ...
), ssr: false }) const DynamicComponent4 = dynamic({ loader: () => import('../components/hello4') }) const DynamicComponent5 = dynamic({ loader: () => import('../components/hello5') }) const DynamicBundle = dynamic({ modules: () => { const components = { Hello6: import('../components/hello6'), Hello7: import('../components/hello7') } return components }, render: (props, { Hello6, Hello7 }) => (HOME PAGE is here!