react-native-modalize-webview
react-native-modalize-webview copied to clipboard
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `ForwardRef`.
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of ForwardRef
.
import {ModalizeWebView} from 'react-native-modalize-webview'
const Login = () => {
const [visible, setVisible] = useState(false); const modalizeRef = useRef(null)
const handleOpen = useCallback(() => { if (modalizeRef.current) { modalizeRef.current.open() } }, [])
return ( <ModalizeWebView ref={modalizeRef} handlePosition="inside" webViewProps={{ source: { uri: "google.com", }, }} />