A framework for building native applications using React
Unify enum and union member comparison types (#55377)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55377 Simplifies the member comparison logic by consolidating enum and union member types into a single discriminated union. This reduces code duplication and makes the comparison result handling more uniform across the codebase, as both member types now follow the same pattern with a `memberKind` discriminator. When D86501597 was added, we couldn't come up with an easy way to converge these, so it was easier to just duplicate the code path for enum for unions. It always felt like a smell to me though, because they are so similar. AI was able to find a good way to converge them. Changelog: [Internal] Reviewed By: makovkastar Differential Revision: D91296850 fbshipit-source-id: 5a1baf1c8149f0c6c9c72c0dce9ea093f71e39cd
E
Eli White committed
23ee291672ad153d77573ecfc57e2bdc395fedae
Parent: 9907a06
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com>
on 1/30/2026, 10:01:44 PM