mirror of
https://github.com/react/react-native.git
synced 2026-09-28 13:23:09 +08:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56687 Simplify and align nullable values in the `Appearance` API. | API | Flow / Strict TS API | Manual `.d.ts` | |---|---|---| | `getColorScheme()` | `ColorSchemeName | null` (narrowed) | `ColorSchemeName | null` | | `useColorScheme()` | `ColorSchemeName | null` (narrowed) | `ColorSchemeName | null` (fixed) | At the native spec level, nullability is removed entirely — the module always returns a valid color scheme, and the module-level `?Spec` already covers the "module absent" case. Changelog: [General][Breaking] - Fix return type of `useColorScheme()` hook (now `ColorSchemeName | null`) - Release Crew note: This is a net fix/extension of D102527387 Reviewed By: cipolleschi Differential Revision: D103865622 fbshipit-source-id: a6391cfd86a634ea660734735614169d0601a830