Relative Content

Tag Archive for reactjsreact-nativereact-hooksreact-context

Changing state in context within useEffect gives maximum depth error

`i get maximum depth error when i change context within useEffect even with empty dependency array,the error doesnt happen when i change it with a button , Here is the code App.js function Alpha() { const ctx = useContext(contexts); function ShareComponnet() { return ( <Stack.Navigator> <Stack.Screen name=”Shares” component={ShareScreen} /> </Stack.Navigator> ); } return ( <NavigationContainer> […]