From 3b8459d66bf7a367ed4acdeda0cce75d2786ef33 Mon Sep 17 00:00:00 2001 From: Ian Jones Date: Fri, 17 Mar 2023 06:20:15 -0700 Subject: [PATCH] xplat RN: fix flow for useSyncExternalStore Summary: They flow type for useSyncExternalStore is incorrect and in consistent with www. v1.0.0 of use-sync-external-store has the third parameter: https://github.com/facebook/react/blob/4997515b96eede5ab1ca622e0439a0707f8d4afd/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L37 This revision is 1.0.0: https://github.com/facebook/react/blob/4997515b96eede5ab1ca622e0439a0707f8d4afd/packages/use-sync-external-store/package.json Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D44163470 fbshipit-source-id: 6582b20ba09f5840b444a1ca3d8fc12d6c783a00 --- packages/react-native/flow/use-sync-external-store.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/flow/use-sync-external-store.js b/packages/react-native/flow/use-sync-external-store.js index 4edac0dbfa6..0cad445f741 100644 --- a/packages/react-native/flow/use-sync-external-store.js +++ b/packages/react-native/flow/use-sync-external-store.js @@ -15,5 +15,6 @@ declare module 'use-sync-external-store/shim' { declare export function useSyncExternalStore( subscribe: (callback: Function) => () => void, getCurrentValue: () => Value, + getServerSnapshot?: () => Value, ): Value; }