Open serhii-yalla opened 4 months ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
:warning: | Newer Version of React Native is Available! |
---|---|
:information_source: | You are on a supported minor version, but it looks like there's a newer patch available - 0.74.3. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
:warning: | Newer Version of React Native is Available! |
---|---|
:information_source: | You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
@serhii-yalla is the same behavior happening also on Old Arch?
@serhii-yalla is the same behavior happening also on Old Arch?
No. On the old arch reload forces styles to change. So it works as expected
@serhii-yalla great thanks for the info. Could you add a couple of videos of OldArch/NewArch? It would make it easier for me to find an owner for this one.
@serhii-yalla great thanks for the info. Could you add a couple of videos of OldArch/NewArch? It would make it easier for me to find an owner for this one.
@cortinico Here it is.
https://github.com/user-attachments/assets/4068afb8-2edb-4342-94a2-91f588adfc19
https://github.com/user-attachments/assets/3ee9aa01-6d7f-4b94-ad63-11eda6da5d24
Great thank you! If we could also have a small reproducer using this template: https://github.com/react-native-community/reproducer-react-native
it would be gold
@cortinico Here is reproducer for you https://github.com/serhii-yalla/RTL-Layout-Direction-Not-Updating-after-app-reload-with-New-React-Native-Architecture
getting the same issue, in the new architecture, the Layout direction is not working
maybe it is related to https://github.com/facebook/react-native/pull/39803
I am also facing the same issue in version 0.76.1. However, it works perfectly on Android; the issue only occurs on iOS.
ihave the same issue on ios
weirdly enough if you close and relaunch the app it works, but not with reloading.
The same goes for iOS and the version "react-native": "0.75.4" with the new architecture.
.
// Enable RTL support [[RCTI18nUtil sharedInstance] allowRTL:YES]; [[RCTI18nUtil sharedInstance] forceRTL:YES];
Adding these lines to the AppDelegate, or removing them doesn't make a difference at all.
any solution for this issue ?
Any news on the issue ? We're unable to update our app to New Arch with this issue still going on as we heavily rely on RTL/LTR language switch especially for our demos.
I'm also facing the same issue
I fixed the problem by adding this line of style for my reusable view component
and it's good
the direction of the app is changed after reload the app using react-native-restart
<View style={{ direction: I18nManager.isRTL ? "rtl" : "ltr" }} {...otherProps} />
I fixed the problem by adding this line of style for my reusable view component and it's good the direction of the app is changed after reload the app using react-native-restart
<View style={{ direction: I18nManager.isRTL ? "rtl" : "ltr" }} {...otherProps} />
this doesn't work in all cases. only in some cases.
I fixed the problem by adding this line of style for my reusable view component and it's good the direction of the app is changed after reload the app using react-native-restart
<View style={{ direction: I18nManager.isRTL ? "rtl" : "ltr" }} {...otherProps} />
Thanks for your answer. It's not a total fix for now, for example : TabNavigator isn't changing, some items using offset are going off and so on. I would say it's an "ok"-ish solution for a temporary fix, but it shouldn't behave like that with new arch vs old arch imho.
We spent a little time looking into this. One of the things that came up was what's the real world use case for dynamically being able to change this when the application is running? Clearly it's useful for testing, but how is this affecting users of your React Native application?
We're just trying to colour the impact of this.
@blakef yes it's needed in the real world cases, users change languages in the app and expect to see the change reflect immediately. this works flawlessly on the web for example.
We spent a little time looking into this. One of the things that came up was what's the real world use case for dynamically being able to change this when the application is running? Clearly it's useful for testing, but how is this affecting users of your React Native application?
We're just trying to colour the impact of this.
People use to change the language say from English to Arabic and need to see those interfaces actually switch from ltr to rtl. Basically you need to "restart" app for that to happen and we've been actively using react-native-restrat until now. However with new arch it's no longer possible and this means people are going to have different app behvaiours and that's not ideal at all. Especially that closing and opening the app will give yet another view to the user (the actual expected one: say for the bottom tabs for examples that will be shown from right-to-left in rtl languages) which means it can be a really confusing UX
any solution?
the issue is still exist in react-native@0.76.3 new Architecture
I guess we have to leave an undeclared variable after the language change to let tha app crash... and hope that user will open it again.
I guess we have to leave an undeclared variable after the language change to let tha app crash... and hope that user will open it again.
I would advice against it, that will make your crash metrics go down hill and might trigger an alert in your google play console.
Description
When using I18nManager to switch the layout direction between RTL (Right-to-Left) and LTR (Left-to-Right), the changes do not reflect after reload on the UI(doesn't force styles), but apply for animations. This issue appears specifically with the new React Native architecture. The styles and layout directions are only applied correctly after the app is fully restarted.
Steps to reproduce
react-native-restart
. to restart the app.text-align: right
).React Native Version
0.74.0
Affected Platforms
Runtime - iOS, Build - MacOS
Areas
Fabric - The New Renderer, TurboModule - The New Native Module System, JSI - Javascript Interface, Bridgeless - The New Initialization Flow, Codegen
Output of
npx react-native info
Reproducer
Screenshots and Videos
No response