diff --git a/BUCK b/BUCK index 7d1f289b304420..78b7b158cd7e79 100644 --- a/BUCK +++ b/BUCK @@ -754,7 +754,6 @@ rn_library( "//xplat/js:node_modules__react_19shallow_19renderer", "//xplat/js:node_modules__regenerator_19runtime", "//xplat/js:node_modules__stacktrace_19parser", - "//xplat/js:node_modules__use_19sync_19external_19store", "//xplat/js:node_modules__whatwg_19fetch", "//xplat/js/RKJSModules/Libraries/Polyfills:Polyfills", "//xplat/js/RKJSModules/Libraries/React:React", diff --git a/packages/react-native/Libraries/Utilities/useColorScheme.js b/packages/react-native/Libraries/Utilities/useColorScheme.js index 0c6b490a1c45a6..3ddd745bc669ef 100644 --- a/packages/react-native/Libraries/Utilities/useColorScheme.js +++ b/packages/react-native/Libraries/Utilities/useColorScheme.js @@ -13,7 +13,7 @@ import type {ColorSchemeName} from './NativeAppearance'; import Appearance from './Appearance'; -import {useSyncExternalStore} from 'use-sync-external-store/shim'; +import {useSyncExternalStore} from 'react'; export default function useColorScheme(): ?ColorSchemeName { return useSyncExternalStore( diff --git a/packages/react-native/flow/use-sync-external-store.js b/packages/react-native/flow/use-sync-external-store.js deleted file mode 100644 index 0cad445f741f4a..00000000000000 --- a/packages/react-native/flow/use-sync-external-store.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict - * @format - * @nolint - */ - -'use strict'; - -declare module 'use-sync-external-store/shim' { - declare export function useSyncExternalStore( - subscribe: (callback: Function) => () => void, - getCurrentValue: () => Value, - getServerSnapshot?: () => Value, - ): Value; -} diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 8951bdff458405..2a319632997fa1 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -110,7 +110,6 @@ "regenerator-runtime": "^0.13.2", "scheduler": "^0.23.0", "stacktrace-parser": "^0.1.10", - "use-sync-external-store": "^1.0.0", "whatwg-fetch": "^3.0.0", "ws": "^6.2.2", "yargs": "^17.6.2" diff --git a/yarn.lock b/yarn.lock index 2f15eff1aa7e57..3257aa9d84d8d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8509,11 +8509,6 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -use-sync-external-store@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.0.0.tgz#d98f4a9c2e73d0f958e7e2d2c2bfb5f618cbd8fd" - integrity sha512-AFVsxg5GkFg8GDcxnl+Z0lMAz9rE8DGJCc28qnBuQF7lac57B5smLcT37aXpXIIPz75rW4g3eXHPjhHwdGskOw== - util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"