-
-
Notifications
You must be signed in to change notification settings - Fork 510
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
Note: usage of ReactFragmentActivity was supposed to be removed in RN 0.57 #7
Comments
I am actually getting that error on RN 0.56.0 react-navigation - 2.14.0 |
I have the same problem. The |
Hey! Seems to be still available in 0.57 -> https://github.com/facebook/react-native/blob/0.57-stable/ReactAndroid/src/main/java/com/facebook/react/ReactFragmentActivity.java In fact, there is another great PR by @dulmandakh here facebook/react-native#20602 which makes the default TLDR: |
👋 @kmagiera - I just tested locally Not sure what may be causing this; you should be able to repro by simply using this test proj I'm using -> https://github.com/kelset/test-react-nav-with-screens. On iOS everything works fine. |
@kelset Replace |
@ritz078 thanks it fixed it! 🤗 |
@kmagiera This probably can be closed :) |
I updated the readme to include an information about that |
According to ReactFragmentActivity.java it will be removed in 0.59. In fact, this recently merged PR removes all of the overriden methods from |
Thanks for pointing that out @noahtallen I was aware that such a change was planned but wasn't following the updates on it. I'll make sure to update docs and glad to hear about this change as it will mean the configuration of screens is going to be simplified. |
@noahtallen / @kmagiera -- For somebody using React-Native 59, what are the current in-progress instructions regarding how to use Do I need to do anything to MainActivity? -- Even using react-native 0.59.1 (Which has |
Currently, when I enable (I'm using react-navigation) Does anybody have a workaround that helps fix this? -- I'm happy to file a new Issue if that would be more helpful @kmagiera |
|
For now it's working well with |
I get an error when i change ReactActivity to ReactFragmentActivity. I'm using "react-native": "^0.59.8", it says 'com.facebook.react.ReactFragmentActivity' is deprecated. Although the performance was increased even using ReactActivity. |
You don't need to extend ReactFragmentActivity for RN 0.59 and above, as
ReactActivity already supports Fragments.
|
@dulmandakh thank you. This should be added to the documentation. |
You can create a PR and fix documentation 😉
|
I see that the library uses and relies on ReactFragmentActivity.
https://github.com/kmagiera/react-native-screens/blob/70c022c6282dfefd2d7edec5e3b382bdcb0d3a04/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.java#L45
On React Native master though, this should have been removed by 0.57
https://github.com/facebook/react-native/blob/7f1fcb67e57769cfe8521756fe4c4a6e5cb64de0/ReactAndroid/src/main/java/com/facebook/react/ReactFragmentActivity.java#L23
The text was updated successfully, but these errors were encountered: