mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
93b50be8c2
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/33770 React has replaced use-subscription with the React 18 compatible use-sync-external-store. Changelog: [General][Changed] - Replace use-subscripton with use-sync-external-store Reviewed By: ryancat Differential Revision: D35592432 fbshipit-source-id: cc2016f66940e53f3614e110bafb02240bae1ae4
20 lines
450 B
JavaScript
20 lines
450 B
JavaScript
/**
|
|
* 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<Value>(
|
|
subscribe: (callback: Function) => () => void,
|
|
getCurrentValue: () => Value,
|
|
): Value;
|
|
}
|