fix(theme-common): remove useless useSyncExternalStore shim (#9276)

This commit is contained in:
Sébastien Lorber 2023-09-04 16:21:59 +02:00 committed by GitHub
parent 6f9f8eeebd
commit 97d5dd094d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 12 deletions

View file

@ -5,10 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
import {useCallback, useEffect} from 'react';
import {useCallback, useEffect, useSyncExternalStore} from 'react';
import {useHistory} from '@docusaurus/router';
// @ts-expect-error: TODO temporary until React 18 upgrade
import {useSyncExternalStore} from 'use-sync-external-store/shim';
import {useEvent} from './reactUtils';
import type {History, Location, Action} from 'history';

View file

@ -5,9 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import {useCallback, useRef} from 'react';
// @ts-expect-error: TODO temp error until React 18 upgrade
import {useSyncExternalStore} from 'use-sync-external-store/shim';
import {useCallback, useRef, useSyncExternalStore} from 'react';
const StorageTypes = ['localStorage', 'sessionStorage', 'none'] as const;