Commit a13be81
Fix ImageSource require (#50963)
Summary:
In react-native-svg, I found that the `Image` component stopped working starting with `[email protected]`. After some debugging, I traced the issue to the migration of `Libraries/Image` to the new export syntax (see 8783196). To fix this, I updated the import to match other requires, similar to https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L84.
[GENERAL] [FIXED] - Fix codegen ImageSource require
Pull Request resolved: #50963
Test Plan:
`validAttributes` process should be a function instead of object with a default property.
Before:
<img width="1041" alt="image" src="https://github.com/user-attachments/assets/9fbc9e9f-6c45-4b0b-adb8-2eb911676fe1" />
After:
<img width="1005" alt="image" src="https://github.com/user-attachments/assets/ee594103-90da-4917-8252-72f4ecfc28e1" />
Reviewed By: Abbondanzo
Differential Revision: D73778127
Pulled By: huntie
fbshipit-source-id: ae80c770e8e578794ae1356751f170ff955e1f5a1 parent a99773d commit a13be81
File tree
3 files changed
+5
-5
lines changed- packages/react-native-codegen
- e2e/__tests__/components/__snapshots__
- src/generators/components
- __tests__/__snapshots__
3 files changed
+5
-5
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
593 | | - | |
| 593 | + | |
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
| |||
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
791 | | - | |
| 791 | + | |
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
| |||
0 commit comments