Skip to content

Commit

Permalink
[NoSsr] Reduce bundle size
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Dec 29, 2024
1 parent 38f77b6 commit 3a3b7c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/unstable-no-ssr/NoSsr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <React.Fragment>{mountedState ? children : fallback}</React.Fragment>;
// TODO casting won't be needed at one point https://github.com/DefinitelyTyped/DefinitelyTyped/pull/65135
return (mountedState ? children : fallback) as React.JSX.Element;
}

NoSsr.propTypes /* remove-proptypes */ = {
Expand Down

0 comments on commit 3a3b7c1

Please sign in to comment.