Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Oct 25, 2023
1 parent 72d92ed commit cd9b788
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/docusaurus-theme-common/src/hooks/useWindowSize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ function getWindowSize() {
* explicit.
*/
export function useWindowSize(): WindowSize {
const [windowSize, setWindowSize] = useState<WindowSize>(() =>
// It's super important to return a constant value to avoid hydration issues
// see https://github.com/facebook/docusaurus/issues/9379
'ssr'
const [windowSize, setWindowSize] = useState<WindowSize>(
() =>
// super important to return a constant value to avoid hydration mismatch
// see https://github.com/facebook/docusaurus/issues/9379
'ssr',
);

useEffect(() => {
Expand Down

0 comments on commit cd9b788

Please sign in to comment.