Refactor codegen: Dispatch props and events from a central place.#34975
Refactor codegen: Dispatch props and events from a central place.#34975ZihanChen-MSFT wants to merge 18 commits into
Conversation
Base commit: e4b5d3e |
Base commit: e4b5d3e |
cipolleschi
left a comment
There was a problem hiding this comment.
Hi, thank for taking this.
I left a couple of comments in the PR.
Plus, are you going to make the same changes for Flow?
I think we should strive to keep the two languages aligned, so it will be easier to create a common denominator to reduce the code duplication (as we are doing for the modules)
cipolleschi
left a comment
There was a problem hiding this comment.
I added some more comments/refactoring to improve typings and readability.
19f0700 to
b448c6e
Compare
b448c6e to
f33ed6f
Compare
cipolleschi
left a comment
There was a problem hiding this comment.
Thanks for these simplifications. There are a couple of linting problems due to unused variables, but it is otherwise good.
Do you think we can do something similar for Flow as well, to keep the two aligned?
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
This pull request was successfully merged by @ZihanChen-MSFT in affcfa7. When will my fix make it into a release? | Upcoming Releases |
Summary
Refer to
In component, props and events pick properties from the component interface by themselves independently, I would like to reverse the direction, to have a function dispatching properties to props and events, to reduce duplicated code.in #34872Changelog
[General] [Changed] - Refactor codegen: Dispatch props and events from a central place.
Test Plan
yarn jest react-native-codegenpassed