title: Pulling Redux data with userID param error - React / Node / Express
body: <p>I am trying to pull a log of user data belonging to userID from my backend in React. The backend API is working correctly with Postman however I can't get this working with the userID. It is console logging the correctly userID in the component however I am yet to get a Thunk Redux store data working with a param passed in.</p>
  <p>Is there anywhere obvious I am going wrong from looking at the code below? I have had my Redux working previously with data not using a param so I know it is not an issue with my store / redux index etc.</p>
  <p>component</p>
  <pre><code>const userDiveLogList = useSelector(state =&gt; state.user.userDiveLogList);
  
      const [userDiveLog, setUserDiveLog] = useState({
          userDiveLogList: [],
          expanded: false
      })
      const dispatch = useDispatch();
  
      useEffect(() =&gt; {
          dispatch(requireUserDiveLogData(user.userID));
      }, []);
  </code></pre>
  <p>action</p>
  <pre><code>// load a users diveLog
  export const requireUserDiveLogData = createAsyncThunk('diveLog/requireData', 
      async (userID, thunkAPI) =&gt; {
          const response = await userDiveLogList(userID);
          return response.data;
      },
      {
          condition: (_, { getState }) =&gt; {
              const { user } = getState(); 
              if (user.didLoadData) {
                  return false;
              }
          }
      }
  )
  </code></pre>
  <p>reducer</p>
  <pre><code>export const userSlice = createSlice({
      name: 'user',
      initialState: {
          userDiveLogList: [],
          didLoadData: false,
      },
      reducers: {
          [requireUserDiveLogData.pending.type]: (state) =&gt; {
              state.didLoadData = true;
          },
          [requireUserDiveLogData.fulfilled.type]: (state, action) =&gt; {
              return {
                  ...state,
                  ...action.payload
              }
          },
  </code></pre>
  <p>service</p>
  <pre><code>// returns list of dives per user from db
  export const userDiveLogList  = (userID) =&gt; {
          return axios.get(API_URL + `userdiveloglist/${userID}`);
      };
  </code></pre>
  <p><strong>Update</strong></p>
  <p>Does this have something to do with my action call for when data gets called if it is already called? I have the getState condition const as userDiveLog when it is in the user branch and it is user/userDiveLogList in the branch, it is also named userDiveLogList when it is being sent at the backend. I can see the backend request being made for the correct user number but nothing is returning.</p>