A framework for building native applications using React
Align nullable types across Appearance API (#56687)
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
A
Alex Hunt committed
ef6463c25d78990386a15bb26319d1d4d224df14
Parent: 8ac88f4
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com>
on 5/7/2026, 8:54:35 AM