-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
RTL Layout Direction Not Updating after app reload with New React Native Architecture #45661
Comments
|
|
|
|
@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. |
@cortinico Here it is. WithoutNewArch.1.mp4WithNewArch.1.mp4 |
Great thank you! it would be gold |
getting the same issue, in the new architecture, the Layout direction is not working |
maybe it is related to #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. 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 |
this doesn't work in all cases. only in some cases. |
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.. |
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 [email protected] 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 would advice against it, that will make your crash metrics go down hill and might trigger an alert in your google play console. |
Having facing the same issue only on iOS, android work perfectly in react native version 0.76.3... any update for iOS ?? |
Another reproducer: https://github.com/bhojaniasgar/RTLIssue |
Facing the same issue here, I use:
|
I'm experiencing same issue on IOS with |
Disable newArch until it is fixed It will solve the problem add this inside your PodFile use_react_native!(:path => config[:reactNativePath], :new_arch_enabled => false) |
@mktufan21 After making this false react-native-mmkv is not working in Version 3.x..x and when downgrading MMKV 2.x.x then android not working is there any way to use MMKV version 3.x.x in android and 2.x.x in iOS till this issue solves in new Architecture |
@asgarPeerbits You have to use the new arch to be able to use rn mmkv v3. |
@a-eid Yes its enable in Android side |
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
The text was updated successfully, but these errors were encountered: