Unverified Commit e6f3782c authored by stefanprobst's avatar stefanprobst Committed by GitHub

update type for next/dynamic `loading` option to accept `ReactNode` (#76402)

parent 01f63576
import React, { type JSX } from 'react' import React from 'react'
import Loadable from './loadable.shared-runtime' import Loadable from './loadable.shared-runtime'
const isServerSide = typeof window === 'undefined' const isServerSide = typeof window === 'undefined'
...@@ -36,7 +36,7 @@ function convertModule<P>(mod: React.ComponentType<P> | ComponentModule<P>) { ...@@ -36,7 +36,7 @@ function convertModule<P>(mod: React.ComponentType<P> | ComponentModule<P>) {
} }
export type DynamicOptions<P = {}> = LoadableGeneratedOptions & { export type DynamicOptions<P = {}> = LoadableGeneratedOptions & {
loading?: (loadingProps: DynamicOptionsLoadingProps) => JSX.Element | null loading?: (loadingProps: DynamicOptionsLoadingProps) => React.ReactNode
loader?: Loader<P> | LoaderMap loader?: Loader<P> | LoaderMap
loadableGenerated?: LoadableGeneratedOptions loadableGenerated?: LoadableGeneratedOptions
ssr?: boolean ssr?: boolean
......
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