Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[react-native] Fix misleading crash when view config is not found #30970

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

javache
Copy link
Member

@javache javache commented Sep 16, 2024

Summary

When a view config can not be found, it currently errors with TypeError: Cannot read property 'bubblingEventTypes' of null. Instead invariant at the correct location and prevent further processing of the null viewConfig to improve the error logged.

How did you test this change?

Build and run RN playground app referencing an invalid native view through requireNativeComponent.

Copy link

vercel bot commented Sep 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 16, 2024 4:48pm

@javache javache merged commit 26855e4 into facebook:main Sep 16, 2024
184 checks passed
@javache javache deleted the native-view-registry branch September 16, 2024 16:51
@react-sizebot
Copy link

Comparing: 9f4e461...39aadbc

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 509.31 kB 509.30 kB = 91.10 kB 91.09 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 514.28 kB 514.23 kB = 91.82 kB 91.81 kB
facebook-www/ReactDOM-prod.classic.js = 604.85 kB 604.90 kB = 106.86 kB 106.87 kB
facebook-www/ReactDOM-prod.modern.js = 581.12 kB 581.13 kB = 103.01 kB 103.01 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
react-native/shims/ReactNativeViewConfigRegistry.js = 3.57 kB 3.55 kB = 1.24 kB 1.23 kB

Generated by 🚫 dangerJS against c12990e

github-actions bot pushed a commit that referenced this pull request Sep 16, 2024
…0970)

## Summary

When a view config can not be found, it currently errors with
`TypeError: Cannot read property 'bubblingEventTypes' of null`. Instead
invariant at the correct location and prevent further processing of the
null viewConfig to improve the error logged.

## How did you test this change?

Build and run RN playground app referencing an invalid native view
through `requireNativeComponent`.

DiffTrain build for commit 26855e4.
github-actions bot pushed a commit that referenced this pull request Sep 16, 2024
…0970)

## Summary

When a view config can not be found, it currently errors with
`TypeError: Cannot read property 'bubblingEventTypes' of null`. Instead
invariant at the correct location and prevent further processing of the
null viewConfig to improve the error logged.

## How did you test this change?

Build and run RN playground app referencing an invalid native view
through `requireNativeComponent`.

DiffTrain build for [26855e4](26855e4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants