diff --git a/packages/react/src/unstable-no-ssr/NoSsr.tsx b/packages/react/src/unstable-no-ssr/NoSsr.tsx index 4c8f5db4b5..acdba952bd 100644 --- a/packages/react/src/unstable-no-ssr/NoSsr.tsx +++ b/packages/react/src/unstable-no-ssr/NoSsr.tsx @@ -33,8 +33,8 @@ function NoSsr(props: NoSsrProps): React.JSX.Element { } }, [defer]); - // We need the Fragment here to force react-docgen to recognise NoSsr as a component. - return {mountedState ? children : fallback}; + // TODO casting won't be needed at one point https://github.com/DefinitelyTyped/DefinitelyTyped/pull/65135 + return mountedState ? children : fallback; } NoSsr.propTypes /* remove-proptypes */ = {