Skip to content

Conversation

@tarunrajput
Copy link
Contributor

@tarunrajput tarunrajput commented May 2, 2023

Summary:

part of codegen Issue #34872

Extract the code that throws if argumentProps are null in a throwIfBubblingTypeisNull function in the error-utils.js file. Use it in the flow/components/events.js and in the typescript/components/event.js files

Changelog:

[Internal][Changed]: Add throwIfBubblingTypeisNull in error-utils and use it in events

Test Plan:

yarn jest react-native-codegen

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 2, 2023
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,628,322 +1
android hermes armeabi-v7a 7,940,429 +3
android hermes x86 9,115,144 +0
android hermes x86_64 8,969,829 +3
android jsc arm64-v8a 9,192,370 +3
android jsc armeabi-v7a 8,381,936 +0
android jsc x86 9,250,550 +1
android jsc x86_64 9,508,880 +1

Base commit: 76a42c2
Branch: main

@facebook-github-bot
Copy link
Contributor

@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@Pranav-yadav Pranav-yadav added the Tech: Codegen Related to react-native-codegen label May 2, 2023
Copy link
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thank you for taking the time to address this. Also, thanks for aligning the implementation between Flow and Typescript, adding the nullable return type in build event schema.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 2, 2023
@facebook-github-bot
Copy link
Contributor

@dmytrorykun merged this pull request in 8494707.

jeongshin pushed a commit to jeongshin/react-native that referenced this pull request May 7, 2023
…in events (facebook#37191)

Summary:
part of codegen Issue facebook#34872

> Extract the code that throws if argumentProps are null in a throwIfBubblingTypeisNull function in the error-utils.js file. Use it in the [flow/components/events.js](https://github.com/facebook/react-native/blob/e133100721939108b0f28dfa9f60ac627c804018/packages/react-native-codegen/src/parsers/flow/components/events.js#L244-L246) and in the [typescript/components/event.js](https://github.com/facebook/react-native/blob/e133100721939108b0f28dfa9f60ac627c804018/packages/react-native-codegen/src/parsers/typescript/components/events.js#L232-L233) files

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal][Changed]: Add throwIfBubblingTypeisNull in error-utils and use it in events

Pull Request resolved: facebook#37191

Test Plan: `yarn jest react-native-codegen`

Reviewed By: cipolleschi

Differential Revision: D45478073

Pulled By: dmytrorykun

fbshipit-source-id: f70ce3f32d93170cafcea9c8b8c2ba06e760fa37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Tech: Codegen Related to react-native-codegen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants