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
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
Not really. Codegen works starting from the 0.67, however we worked on improving it and trying to simplify the setup. The page you linked is a draft of how to use Codegen that will be released together with 0.70, where we changed the syntax of the package.json and we unified how it should work for both ios and android.
Autolinking doesn’t work with the new architecture out of the box. Therefore you need to ask the user of your library to do the following steps
Autolinking for iOS works since 0.68.
Autolinking for Android is coming with 0.70.
That link is a bit outdated. I suggest that you use v0.70 as reference instead of 0.68. We changed several things and simplified the migration process a bit.. And we are continuously improving it.
Migrating to 0.71, as soon as we release that, will be even easier!
I think that a little bit of extra context can be helpful here.
React Native rebundle and ships its own version of React internally (which is the same code you find in the React repo, it's not a customized versiono of React for React Native).
React Native 0.70+ is shipping React 18. New apps created with React Native 0.70+ have the React 18 root enabled by default, but the user can disable it
Activity
[-]Investigate the RN new arquitecture[/-][+]Investigate the RN new architecture[/+]github-actions commentedon Jun 4, 2022
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it
Status: BacklogorStatus: In Progress, I will leave it alone ... forever!"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
marandaneto commentedon Jul 26, 2022
Why the new architecture?
It uses
JSIinstead of theBridgeand other improvements.TurboModules: Ensure your App Provides an RCTCxxBridgeDelegate
Fabric is the new RN's rendering system.
Min Gradle and AGP version are
7.x.Hermes is enabled by default also here.
iOS uses C++ 17 language features.
iOS use Objective C++ and requires
.mmextension.React 18 enabled by default.
Min RN version is 0.68.
CodeGen requires min RN version 0.70.
SentryNativeBridgeModule is likely going to be auto generated and has to be adapted.
0.60.x0.70.x, Check"react-native": ">=$version"onpackage.jsonImportNativeModulesonindex.tsRCTBridgeModuleonRNSentry.hRCT_REMAP_METHODonRNSentry.mbuild.gradleRNSentry.tsNativeRNSentry.ts(naming convention given by the codegen scripts)package.jsonbuild.gradleRNSentry.podspecRCT_NEW_ARCH_ENABLEDon iOS onRNSentry.mRNSentry.mmRNSentryPackagebackward compatible on Android onRNSentryPackage.javaIS_NEW_ARCHITECTURE_ENABLEDon Android onbuild.gradleIS_NEW_ARCHITECTURE_ENABLEDon Android onRNSentryPackage.javaCreateCodegen aNativeSentrySpecon AndroidReactContextBaseJavaModuleon AndroidModuleImplto use the implementation created above on Androidindex.tsPs:
https://github.com/react-native-community/RNNewArchitectureLibraries/tree/feat/back-turbomodule#android-autolinking=
We could patch https://github.com/getsentry/sentry-wizard to do that but we don't know if the new architecture is enabled or not within the final app.
cipolleschi commentedon Jul 26, 2022
The new stable version is 0.69.3
Not really. Codegen works starting from the 0.67, however we worked on improving it and trying to simplify the setup. The page you linked is a draft of how to use Codegen that will be released together with 0.70, where we changed the syntax of the package.json and we unified how it should work for both ios and android.
Autolinking for iOS works since 0.68.
Autolinking for Android is coming with 0.70.
marandaneto commentedon Jul 26, 2022
@cipolleschi Thank you.
cipolleschi commentedon Jul 26, 2022
Here you can find a full migration from 0.67.4 to 0.70.0-rc.0
6 remaining items
cipolleschi commentedon Oct 3, 2022
That link is a bit outdated. I suggest that you use v0.70 as reference instead of 0.68. We changed several things and simplified the migration process a bit.. And we are continuously improving it.
Migrating to 0.71, as soon as we release that, will be even easier!
krystofwoldrich commentedon Oct 5, 2022
@cipolleschi Thanks for the info. I'm now following all the docs for 0.70.
krystofwoldrich commentedon Oct 6, 2022
Upgrade to React 18 can be done after JS SDK is also on 18. Since Rect.Component types are not copatible.
krystofwoldrich commentedon Oct 7, 2022
@marandaneto So we would change this all the way to 0.70.x for the 5.0.0 release?
marandaneto commentedon Oct 7, 2022
Sounds like a problem, does 0.70.x require React 18?
Does it work if people use React 18 but the SDK does not?
marandaneto commentedon Oct 7, 2022
Yes, people can use the v4 of the SDK for < 0.70.x
cipolleschi commentedon Oct 7, 2022
I think that a little bit of extra context can be helpful here.
React Native rebundle and ships its own version of React internally (which is the same code you find in the React repo, it's not a customized versiono of React for React Native).
React Native 0.70+ is shipping React 18. New apps created with React Native 0.70+ have the React 18 root enabled by default, but the user can disable it
krystofwoldrich commentedon Oct 7, 2022
@cipolleschi So until we can upgrade to react 18 we can just use 17 (but of course, we will miss some features).
cipolleschi commentedon Oct 7, 2022
Yeah, technically if the users turn off this setting for iOS and its equivalent for Android, it should behave like React 17.
krystofwoldrich commentedon Oct 10, 2022
React 18 is working now, it wasn't actually JS SDK (they support v18), but it was an error in our RN sdk.
krystofwoldrich commentedon Oct 11, 2022
Seems like ReactNavigation and New Arch on Android don't play well yet, I've run into the same issue.
software-mansion/react-native-screens#1608
ios works well, but on Android I'm getting the same error
marandaneto commentedon Oct 11, 2022
Also hitting the issue react/react-native#34923
krystofwoldrich commentedon Oct 11, 2022
When this will make it to a RN release we will be able to return the modal feedback view to the new arch example.
react/react-native@9ac437f
At the moment the modal view is not implemented/included in Fabric Renderer.
marandaneto commentedon Oct 14, 2022
Better stack traces when Java crashes apparently depend on the outcome of this issue getsentry/sentry-native#743 and getsentry/sentry-native#752 (comment) or if the RN engine actually improves something.