-
-
Notifications
You must be signed in to change notification settings - Fork 518
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
feat!: remove native components from public API #2412
feat!: remove native components from public API #2412
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing that concerns me is whether platform extensions, e.g. .web.tsx
/ .native.tsx
are supported by all major bundlers and not only Metro. Do we have knowledge here?
Besides this I think we're good. Just make sure that we work as regular on fresh installation. Thanks!
/** | ||
* Modules | ||
*/ | ||
export { default as NativeScreensModule } from './fabric/NativeScreensModule'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uff, isn't it consumed in reanimated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a module, not a component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not used anywhere, so I removed that as well. Imo all functions from it should go through our proxy. But I can revert this change.
|
||
const ScreenContentWrapper = View; | ||
export default ScreenContentWrapper; | ||
export default View; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export default View; | |
const ScreenComponentWrapper = View; | |
export default ScreenComponentWrapper; |
Nitpick: only for readability purposes, so that it is clear what component is meant to be exported from this module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I suggest doing the same for all the components)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in: 4bc520d
Is there any other alternative then Re.Pack? Based on https://github.com/callstack/repack/blob/f119ab3eb94eff9d2cc1aec8fcf9f835c3025abc/website/src/public/configs/webpack.config#L77 I assume it handles platform extensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
## Description This PR intents to fix current screen going blank on Android when returning to the previous one. The issue has been already fixed by #2134, but re-appeared recently. After a quick bisect it turned out that #2412 caused the regression. Bringing back the removed `NativeScreensModule` export fixes the issue. Fixes #1685 ## Changes - added missing export - modified `Test2282.tsx` repro ## Screenshots / GIFs ### Before https://github.com/user-attachments/assets/39bf6c66-39d2-4dfd-abc8-ee1c690417a4 ### After https://github.com/user-attachments/assets/003446b2-c976-4cdb-8ab4-348dd619ba79 ## Test code and steps to reproduce - use `Test2282.tsx` repro ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes --------- Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
Description
This PR removes native components from our API. The motivation is that those shouldn't be available directly, only through our interface.
Checklist