import React from 'react'; import dynamic from 'next/dynamic'; export default ({ componentPromise, // TODO rename getProps = () => ({} as Props), }: { componentPromise: () => Promise>; getProps: () => Props; }) => { const DynamicComponentWithNoSSR = dynamic(componentPromise, { ssr: false }); const props: Props = getProps(); return ; };