Repository navigation
feat!: remove native components from public API - #2412
Conversation
kkafar
left a comment
There was a problem hiding this comment.
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.
Uff, isn't it consumed in reanimated?
There was a problem hiding this comment.
That's a module, not a component.
There was a problem hiding this comment.
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.
| 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.
(I suggest doing the same for all the components)
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. |
## 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 intents to fix current screen going blank on Android when returning to the previous one. The issue has been already fixed by software-mansion/react-native-screens#2134, but re-appeared recently. After a quick bisect it turned out that software-mansion/react-native-screens#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