I am using expo to build my react-native project but got this error:
The error is: Invariant Violation: Native component for “RNCWebView does not exist”
As I know, there are two options for displaying web contents
import {WebView} from “react-native-webview”
import {WebView} from “react-native”
I am using expo for my react-native project
So, there are some bugs/errors I got
For the 1st option, I got error–> Invariant Violation: Native component for “RNCWebView does not exist”
For the 2nd option, I got no error but instead of showing url, it shows me white page which shows nothing
I tried many solutions from GitHub and StackOverflow but doesn’t work
Any new idea?
There’s just one thing to be aware of: There are entries for WebView under both the SDK and the React Native sections of the menu. The “React Native” version is about the old import { WebView } from 'react-native'; whereas the one under “SDK” is the new import { WebView } from 'react-native-webview';
So if you find that there are entries under both the SDK section and the React Native section you should generally prefer the SDK entry.