Skip to content

Commit

Permalink
update dynamic-import.md example (#46787)
Browse files Browse the repository at this point in the history
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'.`
  • Loading branch information
irekrog authored Mar 6, 2023
1 parent a9be890 commit a0c4354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/advanced-features/dynamic-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit a0c4354

Please sign in to comment.