Unverified Commit a0c4354b authored by Irek Róg's avatar Irek Róg Committed by GitHub

update dynamic-import.md example (#46787)

Because there is a TS error when is set just a string:
`TS2322: Type '() => string' is not assignable to type '(loadingProps: DynamicOptionsLoadingProps) => Element | null'.   Type 'string' is not assignable to type 'Element'.`
parent a9be8902
......@@ -23,7 +23,7 @@ By using `next/dynamic`, the header component will not be included in the page's
import dynamic from 'next/dynamic'
const DynamicHeader = dynamic(() => import('../components/header'), {
loading: () => 'Loading...',
loading: () => <p>Loading...</p>,
})
export default function Home() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment