2 * Copyright (c) Meta Platforms, Inc. and affiliates.
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
9 import {useEffect, useLayoutEffect} from 'react';
10 import {CAN_USE_DOM} from 'lexical/shared/canUseDOM';
12 // This workaround is no longer necessary in React 19,
13 // but we currently support React >=17.x
14 // https://github.com/facebook/react/pull/26395
15 const useLayoutEffectImpl: typeof useLayoutEffect = CAN_USE_DOM
19 export default useLayoutEffectImpl;