Skip to content

Commit c963001

Browse files
shubh73claude
andcommitted
Document why needsPropTransforms compares against undefined
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent ba85519 commit c963001

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/react-native/Libraries/Components/View

‎packages/react-native/Libraries/Components/View/View.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ component View(ref?: React.RefSetter<ViewInstance>, ...props: ViewProps) {
7373
return actualView;
7474
}
7575

76-
// Must check every prop that `transformProps` reads.
76+
// Must check every prop that `transformProps` reads. Compares against
77+
// `undefined` rather than `null` so that `null` values still go through
78+
// `transformProps`, which strips them.
7779
function needsPropTransforms(props: ViewProps): boolean {
7880
return (
7981
props.accessibilityState !== undefined ||

0 commit comments

Comments
 (0)