You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
babel plugin does not handle re-exports, causes incorrect theming #4874
When re-exporting components from react-native paper, e.g. export { TextInput } from 'react-native-paper, the components are not styled using the theme set in the Provider.
Investigating I found that it seemed related to the babel plugin which does not rewrite these imports. I can't explain though why these paths not being re-written is actually causing issues in applying the theme 🤔
Expected behaviour
export{TextInput}from 'react-native-paper
Should use the theme set in the app's Provider.
And the babel plugin should accurately rewrite the import paths
How to reproduce?
With an app (shows the theme issue):
Latest 'react-native-paper', an app theme which overrides a color for example onSurface which is used in TextInput.
You see that the test generates an output with + export { TextInput } from 'react-native-paper';, which is not rewritten to the full path. My assumption is that this is what is causing the app them behavior
Preview
with the re-export:
with the explicit import & then export:
What have you tried so far?
Adding an explicit import, followed by explicit export
changed the title [-]babel plugin does not handle re-exports[/-][+]babel plugin does not handle re-exports, causes to incorrect theming [/+]on Feb 23, 2026
changed the title [-]babel plugin does not handle re-exports, causes to incorrect theming [/-][+]babel plugin does not handle re-exports, causes incorrect theming [/+]on Feb 23, 2026
Activity
[-]babel plugin does not handle re-exports[/-][+]babel plugin does not handle re-exports, causes to incorrect theming [/+][-]babel plugin does not handle re-exports, causes to incorrect theming [/-][+]babel plugin does not handle re-exports, causes incorrect theming [/+]