title: Redux does not change values
body: <p>my Redux does not change the variables value. I am trying to test out Redux but I really cant find what I am doing wrong. For now I am only trying to Log a value but the value does not change.</p>
  <p>This is my ReduxActions:</p>
  <pre><code>export const TEST_FUNC = 'TEST_FUNC';
  
  export const testFunc = () =&gt; {
      
      const theTestingString = &quot;TAG testing redux&quot;;
  
      return {
          type: TEST_FUNC,
          payload: theTestingString
      }
  }
  </code></pre>
  <p>In my Reducer I give the variable a initial value, and in my Actions file I am trying to change that value but when I console.log(testRedux) I only get the initial value. here is my Reducer:</p>
  <pre><code>import { TEST_FUNC } from &quot;../actions/firebaseActions&quot;;
  
  const initialState = {
      theTestingString: 'Initial Value',
  }
  
  export default function(state = initialState, action) {
  
          switch(action.type) {
              case TEST_FUNC: 
              console.log(&quot;HSKJDKJSKFDBSKJKAJDL&quot;)
              return {
                  ...state,
                  theTestingString: action.payload
              }
          }
  
          return state;
  }
  </code></pre>
  <p>Here is my Store:</p>
  <pre><code>import {createStore, applyMiddleware, combineReducers} from 'redux';
  import thunk from 'redux-thunk';
  import {composeWithDevTools} from 'redux-devtools-extension';
  
  import firebaseReducer from './reducers/firebaseReducer';
  
  const rootReducer = combineReducers({
      firebaseTest: firebaseReducer
  });
  
  const middleware = composeWithDevTools(applyMiddleware(thunk));
  
  export default createStore(rootReducer, middleware);
  </code></pre>
  <p>Here is where I am trying to log the value:</p>
  <pre><code>import { useNavigation } from '@react-navigation/native';
  import { StatusBar } from 'expo-status-bar';
  import { StyleSheet, Text, View } from 'react-native';
  import {Button, Card, TextInput} from 'react-native-paper';
  import { FirebaseContext } from '../../context/FirebaseContext';
  import React, {useContext, useEffect, useState } from 'react';
  import { useSelector } from 'react-redux';
  
  const initialUserState = {
      userName: 'Nicole Lopez',
      password: '1001008888',
  }
  
  export default function LoginScreen() {
      const [disabled, setDisabled] = useState(false);
      const [userState, setUserState] = useState(initialUserState);
      const testRedux = useSelector(state =&gt; state.firebaseTest.theTestingString);
      //const fbContext = React.useContext(FirebaseContext);
      const navigation = useNavigation();
  
      console.log(&quot;Logging right away: &quot; + testRedux);
  
      const onInputChange = (field, value) =&gt; {
          setUserState({
              ...userState,
              [field]: value
          })
      }
  
      useEffect(() =&gt; {
          setDisabled(userState.userName.length === 0 || userState.password.length === 0);
      }, [userState.userName, userState.password])
  
    return (
      &lt;View style={styles.container}&gt;
              &lt;Card style={styles.card}&gt;
  
                  &lt;TextInput
                      mode=&quot;outlined&quot;
                      label=&quot;Förnamn &amp; Efternman&quot;
                      defaultValue={userState.userName}
                      onChangeText={text =&gt; onInputChange(&quot;username&quot;, text)}
                      right={&lt;TextInput.Icon name=&quot;account&quot; onPress={() =&gt; {
                      }}/&gt;}
                      style={styles.textInput}/&gt;
  
                  &lt;TextInput
                      mode=&quot;outlined&quot;
                      label=&quot;Anställningsnummer 100100xxxx&quot;
                      defaultValue={userState.password}
                      right={&lt;TextInput.Icon name=&quot;lock&quot;/&gt;}
                      onChangeText={text =&gt; onInputChange(&quot;password&quot;, text)}
                      style={styles.textInput}/&gt;
              &lt;/Card&gt;
  
              &lt;View style={styles.buttonRow}&gt;
  
                  &lt;Button
                      color={disabled ? &quot;gray&quot; : undefined}
                      disabled={disabled}
                      mode={'contained'}
                      icon={'login'}
                      onPress={() =&gt; {
                          //console.log(&quot;The func: &quot; + testRedux)
                          console.log(&quot;The variable: &quot; + testRedux)
                          //console.log(fbContext)
                          //console.log(&quot;TAG isUserSignedIn: &quot; + fbContext?.isuserSignedIn)
                          //console.log(&quot;TAG testLog:::: &quot; + fbContext?.testLog())
                          //fbContext?.testLog()
                          //console.log(&quot;TAG LOGIN BTN PRESSED&quot;)
                          //navigation.navigate('HomeScreen')
                      }}&gt;Login&lt;/Button&gt;
              &lt;/View&gt;
          &lt;/View&gt;
    );
  }
  </code></pre>
  <p>This is my App.js:</p>
  <pre><code>import { StatusBar } from 'expo-status-bar';
  import { StyleSheet, Text, View } from 'react-native';
  import { createNativeStackNavigator } from '@react-navigation/native-stack';
  import {StackScreens} from './src/helpers/types';
  import { NavigationContainer, useNavigationContainerRef } from '@react-navigation/native';
  import {SafeAreaProvider} from 'react-native-safe-area-context';
  import LoginScreen from './src/screens/LoginScreen/LoginScreen';
  import HomeScreen from './src/screens/HomeScreen/HomeScreen';
  import {doc, getFirestore, onSnapshot, setDoc, Unsubscribe as UnsubscribeFS} from 'firebase/firestore';
  import { FirebaseContextProvider, FirebaseContext } from './src/context/FirebaseContext';
  import { useContext } from 'react';
  import {Provider} from 'react-redux';
  
  import store from './src/redux/Store';
  
  
  const Stack = createNativeStackNavigator();
  
  export default function App() {
    return (
      &lt;Provider store={store}&gt;
        &lt;Content /&gt;
      &lt;/Provider&gt;  
    );
  }
  
  export const Content = () =&gt; {
  
    const navigationRef = useNavigationContainerRef();
    const firebaseContext = useContext({FirebaseContext});
  
    return (
      
      &lt;NavigationContainer ref={navigationRef}&gt;
          &lt;Stack.Navigator initialRouteName=&quot;LoginScreen&quot;&gt;
            &lt;Stack.Screen name=&quot;LoginScreen&quot; component={LoginScreen} /&gt;
            &lt;Stack.Screen name=&quot;HomeScreen&quot; component={HomeScreen} /&gt; 
          &lt;/Stack.Navigator&gt;
        &lt;/NavigationContainer&gt;
        
    );
  }
  </code></pre>
  <p>I am new to ReactNative, I have tried Context but I got a similar issue, maybe I'm doing something in the wrong order?</p>