-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Unimplemented component: <ModalHostView> #33652
Comments
I am getting this message on iOS but not on android. |
I facing the same issue dude: #33668 Hope someone can help. After the 0.68.1 launching, the support/engagement disappeared. |
Hi @nikhil-kumar-160, thanks for raising the issue. The component you are trying to use has not been migrated to Fabric. Therefore, it's not compatible with the New Architecture. Could you prepare a small repo with a reproducer and share it with us? |
👁 |
Okay @cipolleschi, I'll try to update a repo link for the same. |
Repo link:- https://github.com/nikhil-kumar-160/TestApp.git |
@cipolleschi, One More Thing, It works perfectly on android. The issue is only on iOS |
any updates? |
I recently tried RN 0.69.1 and the issue still persists |
hi @nikhil-kumar-160, I found a temporary solution, hope it helps you.
Class<RCTComponentViewProtocol> RCTFabricComponentsProvider(const char *name) {
static std::unordered_map<std::string, Class (*)(void)> sFabricComponentsClassMap = {
{"SafeAreaView", RCTSafeAreaViewCls},
{"ScrollView", RCTScrollViewCls},
{"PullToRefreshView", RCTPullToRefreshViewCls},
{"ActivityIndicatorView", RCTActivityIndicatorViewCls},
{"Slider", RCTSliderCls},
{"Switch", RCTSwitchCls},
{"UnimplementedNativeView", RCTUnimplementedNativeViewCls},
{"Paragraph", RCTParagraphCls},
{"TextInput", RCTTextInputCls},
{"InputAccessoryView", RCTInputAccessoryCls},
{"View", RCTViewCls},
{"Image", RCTImageCls},
{"ModalHostView", RCTModalHostViewCls},
};
auto p = sFabricComponentsClassMap.find(name);
if (p != sFabricComponentsClassMap.end()) {
auto classFunc = p->second;
return classFunc();
}
return RCTThirdPartyFabricComponentsProvider(name);
} this will enable ModalHostView for Fabric |
Thanks so much Milker. This temporary fix works great, and I'm wondering how you figured it out? I'm updating an app that has several "Unimplemented Components" and I'm wondering if I may be able to use this approach for any other quick-fixes. |
@EvilGeniusTechnologies There are other "Unimplemented Components" you mentioned, which I encountered as well, it seems that many libraries don't support Fabric yet, so it will take time. The above solution is a special case, because Modal is a built-in component of ReactNative, and ReactNative implements Fabric for it, but I don’t know why it is not used, and there may be some problems, so the above solution is only temporary. At present, in most cases, the problem is that there is no component that does not implement Fabric. If you want to solve it in advance, you need to refer to the official documentation to implement Fabric for the component. |
…4487) Summary: While working on a fix for facebook#29974 (I have a draft for that already (gabrieldonadel#16), just waiting for facebook#34406 to get merged) I noticed that the `KeyboardAvoidingView` tests on RNTester on iOS were not working with Fabric enabled because the `ModalHostView` component was still not implemented. Upon some more investigation, I found this code suggestion from Milker90 (facebook#33652 (comment)) that enables the Modal component on iOS when Fabric is enabled. Closes facebook#33652 ## Changelog [iOS] [Added] - Add support for Modal on iOS when Fabric is enabled Pull Request resolved: facebook#34487 Test Plan: 1. With Fabric enabled open the RNTester app and navigate to the Modal page 2. Test the `Modal` component through the sections changing props https://user-images.githubusercontent.com/11707729/186289099-5223907d-b300-46bf-bfde-73259c29d544.mov Reviewed By: christophpurrer Differential Revision: D38981895 Pulled By: cipolleschi fbshipit-source-id: cd493a8d2035900da2576323bc112e2565df4834
Hey guys, wondering if this has been released already ? Pushed a reproductible demo here https://github.com/Clonescody/rn-modal-error-new-arch |
same issue here! |
@imWildCat @Clonescody, thanks for reporting this. |
Is this PR in the RC3 or RC4 versions? I'm still seeing this error on both. |
Description
After enabling the new Architecture for my React Native App, the Modal shows following message inside the component
n
Version
0.68.0
Output of
npx react-native info
System:
OS: macOS 12.3.1
CPU: (8) arm64 Apple M1
Memory: 427.50 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 17.8.0 - /opt/homebrew/bin/node
Yarn: 1.22.17 - /opt/homebrew/bin/yarn
npm: 8.5.5 - /opt/homebrew/bin/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 28, 29, 30, 31, 32
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 32.0.0, 32.1.0
System Images: android-31 | Google APIs ARM 64 v8a, android-31 | Google Play ARM 64 v8a, android-32 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8193401
Xcode: 13.3/13E113 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.0 => 0.68.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
We can see the message by simply importing Modal from react-native.
Snack, code example, screenshot, or link to a repository
No response
The text was updated successfully, but these errors were encountered: