lazy loading components

This commit is contained in:
Matthias Kretschmann 2019-10-21 12:00:14 +02:00
parent 4a0d07d43a
commit 8f1a166ab1
Signed by: m
GPG Key ID: 606EEEF3C479A91F
1 changed files with 4 additions and 3 deletions

View File

@ -1,10 +1,11 @@
import React from 'react'
import Add from '../components/Add'
import dynamic from 'next/dynamic'
import { title, description } from '../../site.config'
import Layout from '../Layout'
import styles from './index.module.css'
import Layout from '../Layout'
import Info from '../components/Info'
const Add = dynamic(() => import('../components/Add'))
const Info = dynamic(() => import('../components/Info'))
const Home = () => (
<Layout>