436onn
436onn

Reputation: 27

TypeError: null is not an object (evaluating 'dispatcher.useState')

TypeError: null is not an object (evaluating 'dispatcher.useState')

This error is located at: in WebViewModal in RCTView (created by View) in View (created by Login) in PortalProvider in WebViewModalProvider (created by Login) in RCTView (created by View) in View (created by Login) in RCTView (created by View) in View (created by ScrollView) in RCTScrollView (created by ScrollView) in ScrollView (created by ScrollView) in ScrollView in Unknown (created by AnimatedComponent) in AnimatedComponent in AnimatedComponentWrapper (created by NativeViewGestureHandler) in NativeViewGestureHandler in RCTView (created by View) in View (created by AnimatedComponent) in AnimatedComponent in AnimatedComponentWrapper (created by PanGestureHandler) in PanGestureHandler in RCTView (created by View) in View (created by KeyboardAvoidingView) in KeyboardAvoidingView (created by AnimatedComponent) in AnimatedComponent in AnimatedComponentWrapper in RCTView (created by View) in View (created by TapGestureHandler) in TapGestureHandler in RCTView (created by View) in View in ModalizeBase (created by Login) in RCTView (created by View) in View (created by Login) in RCTView (created by View) in View (created by KeyboardAvoidingView) in KeyboardAvoidingView (created by Login) in Login (created by SceneView) in StaticContainer in EnsureSingleNavigator (created by SceneView) in SceneView (created by CardContainer) in RCTView (created by View) in View (created by CardContainer) in RCTView (created by View) in View (created by CardContainer) in RCTView (created by View) in View in CardSheet (created by Card) in RCTView (created by View) in View (created by AnimatedComponent) in AnimatedComponent in AnimatedComponentWrapper (created by PanGestureHandler) in PanGestureHandler (created by PanGestureHandler) in PanGestureHandler (created by Card) in RCTView (created by View) in View (created by AnimatedComponent) in AnimatedComponent in AnimatedComponentWrapper (created by Card) in RCTView (created by View) in View (created by Card) in Card (created by CardContainer) in CardContainer (created by CardStack) in RNSScreen (created by AnimatedComponent) in AnimatedComponent in AnimatedComponentWrapper (created by InnerScreen) in Suspender (created by Freeze) in Suspense (created by Freeze) in Freeze (created by DelayedFreeze) in DelayedFreeze (created by InnerScreen) in InnerScreen (created by Screen) in Screen (created by MaybeScreen) in MaybeScreen (created by CardStack) in RNSScreenContainer (created by ScreenContainer) in ScreenContainer (created by MaybeScreenContainer) in MaybeScreenContainer (created by CardStack) in RCTView (created by View) in View (created by Background) in Background (created by CardStack) in CardStack (created by HeaderShownContext) in RNCSafeAreaProvider (created by SafeAreaProvider) in SafeAreaProvider (created by SafeAreaInsetsContext) in SafeAreaProviderCompat (created by StackView) in RNGestureHandlerRootView (created by GestureHandlerRootView) in GestureHandlerRootView (created by StackView) in StackView (created by StackNavigator) in PreventRemoveProvider (created by NavigationContent) in NavigationContent in Unknown (created by StackNavigator) in StackNavigator (created by MainNavigator) in MainNavigator (created by App) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by App) in App (created by withDevTools(App)) in withDevTools(App) in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in main(RootComponent) WARN Got a component with the name 'taskDetails' for the screen 'taskDetails'. React Components must start with an uppercase letter. If you're passing a regular function and not a component, pass it as children to 'Screen' instead. Otherwise capitalize your component's name. StackNavigator@http://192.168.1.2:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:116021:18 MainNavigator EnsureSingleNavigator@http://192.168.1.2:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:105549:24 BaseNavigationContainer@http://192.168.1.2:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:104141:28 ThemeProvider@http://192.168.1.2:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:109588:21 NavigationContainerInner@http://192.168.1.2:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:109479:26 App withDevTools(App)@http://192.168.1.2:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:103360:27 RCTView View RCTView View AppContainer@http://192.168.1.2:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:90236:36 main(RootComponent)@http://192.168.1.2:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:95329:28 Well, what happens is that it was working perfectly and was opening my webview on the login screen, but now it has stopped working and this message is appearing. Does anyone know why? This message appeared after I updated the version of React native

const Login = () => {
    const [input, setInput] = useState('');
    const [hidePass, setHidePass] = useState(true);
    const [ischecked1, setIschecked1] = useState(true);
    const [visible, setVisible] = useState(false);
    const navigation = useNavigation();
    const modalizeRef = useRef(null);
    

    function onOpen() {
        modalizeRef.current?.open();
    }

    return (

        <KeyboardAvoidingView
            style={styles.container}
        >
            <SafeAreaView>
                <Modalize
                    ref={modalizeRef}
                    snapPoint={500}
                //handlePosition="inside"
                >
                    <View style={{
                        flex: 1, height: 500,
                        flexDirection: 'row', justifyContent: 'center'
                    }}>
                        <WebViewModalProvider>
                            <View style={{ margin: 30, height: 500 }}>
                                <SafeAreaView />
                                <WebViewModal
                                    visible={true}
                                    source={{ uri: "https://google.com" }}
                                    style={{ margin: 10 }}
                                />
                            </View>
                        </WebViewModalProvider>
                    </View>
                </Modalize>

                <ScrollView style={{ flex: 1 }}>

                    <Image
                        source={require('../../assets/logo.png')}
                        style={styles.logo}
                    />
                    <Text style={styles.helloText}>
                        Olá de novo !
                    </Text>
                    <Text style={styles.welcomeText}>
                        Bem-vindo(a) de volta,
                        sentimos sua falta!
                    </Text>

                    <TextInput
                        style={styles.inputArea}
                        placeholder="Digite o e-mail"
                    />
                    <TextInput
                        style={styles.inputArea}
                        placeholder="Senha"
                        value={input}
                        onChangeText={(texto) => setInput(texto)}
                        secureTextEntry={hidePass}
                    />
                    <TouchableOpacity style={styles.eye} onPress={() => setHidePass(!hidePass)}>
                        <Ionicons name={hidePass ? 'eye' : 'eye-off'}
                            color="#A0D800" size={25}
                        />
                    </TouchableOpacity>
                    <View style={styles.checkBoxStyle}>
                        <CheckBox
                            left
                            size={18}
                            checkedColor='#A0D800'
                            value={ischecked1}
                            checked={ischecked1}
                            onPress={() => setIschecked1(!ischecked1)}

                            containerStyle={{
                                backgroundColor: "transparent",
                                borderColor: "transparent", marginRight: 0
                            }}
                        />
                        <TouchableOpacity onPress={() => setIschecked1(true)}>
                            <Text style={styles.Connected}>
                                Manter-se conectado
                            </Text>
                        </TouchableOpacity>

                        <TouchableOpacity //onPress={() => 
                            // Linking.openURL('https://account.activedirectory.windowsazure.com/ChangePassword.aspx')}
                            onPress={onOpen}>
                            <Text style={styles.forgotPassword}>
                                Esqueci minha senha
                            </Text>
                        </TouchableOpacity>
                    </View>

                    <TouchableOpacity
                        style={styles.botao}
                        onPress={() => navigation.navigate("TabNavigator")}
                    >
                        <Text style={styles.botaoText}>Entrar</Text>
                    </TouchableOpacity>


                </ScrollView>
            </SafeAreaView>
        </KeyboardAvoidingView>
    );

}

Upvotes: 0

Views: 988

Answers (0)

Related Questions